mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-21 20:39:22 +00:00
Can specify custom primary color
This commit is contained in:
parent
18d3ae6955
commit
0edea3edd4
@ -28,6 +28,8 @@ void main() {
|
||||
apiServerSecure: false,
|
||||
clientName: "ForezFlutter",
|
||||
splashBackgroundColor: Colors.green.shade900,
|
||||
primaryColor: Colors.green,
|
||||
primaryColorDark: Colors.green.shade900,
|
||||
appName: "#Forez",
|
||||
appQuickDescription: tr("Events organisation in Forez plain"),
|
||||
toursEntriesBuilder: buildTour,
|
||||
|
@ -3,6 +3,7 @@ import 'package:comunic/helpers/database/database_helper.dart';
|
||||
import 'package:comunic/helpers/preferences_helper.dart';
|
||||
import 'package:comunic/helpers/serialization/user_list_serialization_helper.dart';
|
||||
import 'package:comunic/helpers/version_helper.dart';
|
||||
import 'package:comunic/models/config.dart';
|
||||
import 'package:comunic/ui/widgets/init_widget.dart';
|
||||
import 'package:comunic/utils/flutter_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
@ -62,7 +63,10 @@ class ComunicApplicationState extends State<ComunicApplication> {
|
||||
return MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: InitializeWidget(),
|
||||
theme: prefs.enableDarkMode ? ThemeData.dark() : null,
|
||||
theme: (prefs.enableDarkMode ? ThemeData.dark() : ThemeData.fallback())
|
||||
.copyWith(
|
||||
primaryColor: config().primaryColor,
|
||||
primaryColorDark: config().primaryColorDark),
|
||||
showPerformanceOverlay: prefs.showPerformancesOverlay,
|
||||
);
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ class Config {
|
||||
final bool apiServerSecure;
|
||||
final String clientName;
|
||||
final Color splashBackgroundColor;
|
||||
final Color primaryColor;
|
||||
final Color primaryColorDark;
|
||||
final String appName;
|
||||
final String appQuickDescription;
|
||||
|
||||
@ -28,6 +30,8 @@ class Config {
|
||||
@required this.apiServerSecure,
|
||||
@required this.clientName,
|
||||
this.splashBackgroundColor = defaultColor,
|
||||
this.primaryColor,
|
||||
this.primaryColorDark,
|
||||
this.appName = "Comunic",
|
||||
this.appQuickDescription,
|
||||
this.toursEntriesBuilder,
|
||||
|
Loading…
Reference in New Issue
Block a user