D1APP-19 System overlay style
This commit is contained in:
parent
f36a7f9aa8
commit
5ec97ecb3b
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class DesignConfig {
|
||||
static const Color lightPrimaryColor3 = Color(0XFFF5FAFC);
|
||||
|
|
@ -37,6 +38,8 @@ class DesignConfig {
|
|||
brightness: Brightness.light,
|
||||
);
|
||||
|
||||
static const currentColorScheme = lightColorScheme;
|
||||
|
||||
static const TextStyle subtitle2Text = TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
|
@ -54,4 +57,13 @@ class DesignConfig {
|
|||
static final Border lightBorder = Border.all(color: DesignConfig.greyColor4);
|
||||
|
||||
static const Duration defaultAppDuration = Duration(milliseconds: 400);
|
||||
|
||||
static final SystemUiOverlayStyle systemUIOverlayStyle = SystemUiOverlayStyle(
|
||||
statusBarBrightness: Brightness.dark,
|
||||
statusBarIconBrightness: Brightness.dark,
|
||||
statusBarColor: Colors.transparent,
|
||||
systemNavigationBarColor: currentColorScheme.surface,
|
||||
systemNavigationBarDividerColor: Colors.transparent,
|
||||
systemNavigationBarIconBrightness: Brightness.dark,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'package:didvan/config/design_config.dart';
|
|||
import 'package:didvan/providers/user_provider.dart';
|
||||
import 'package:didvan/routes/route_generator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
|
@ -15,21 +16,24 @@ class Didvan extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => UserProvider(),
|
||||
child: MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Didvan',
|
||||
theme: DesignConfig.lightTheme,
|
||||
onGenerateRoute: (settings) => RouteGenerator.generateRoute(settings),
|
||||
initialRoute: '/',
|
||||
localizationsDelegates: const [
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale("fa", "IR"),
|
||||
],
|
||||
locale: const Locale("fa", "IR"),
|
||||
child: AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
value: DesignConfig.systemUIOverlayStyle,
|
||||
child: MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Didvan',
|
||||
theme: DesignConfig.lightTheme,
|
||||
onGenerateRoute: (settings) => RouteGenerator.generateRoute(settings),
|
||||
initialRoute: '/',
|
||||
localizationsDelegates: const [
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale("fa", "IR"),
|
||||
],
|
||||
locale: const Locale("fa", "IR"),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue