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