mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-01-19 03:37:02 +00:00
64d45f66c7
This updates flutter to 3.24.1, the latest stable version, and also updates our flutter dependencies to latest. It targets the latest android sdk, 34, which is required if we want to publish a new version to the Google Play store. I also needed to make a few adjustments to handle deprecations. The biggest change is that I needed to wrap the main widget in MaterialApp to avoid problems with AdaptiveSwitch in iOS.
30 lines
870 B
Dart
30 lines
870 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
TextStyle basicTextStyle(BuildContext context) =>
|
|
Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.titleMedium!;
|
|
|
|
const double _headerFontSize = 13.0;
|
|
|
|
class ConfigHeader extends StatelessWidget {
|
|
const ConfigHeader({Key? key, required this.label, this.color}) : super(key: key);
|
|
|
|
final String label;
|
|
final Color? color;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.only(left: 10.0, top: 30.0, bottom: 5.0, right: 10.0),
|
|
child: Text(
|
|
label,
|
|
style: basicTextStyle(context).copyWith(
|
|
color: color ?? CupertinoColors.secondaryLabel.resolveFrom(context),
|
|
fontSize: _headerFontSize,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|