mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 09:29:39 +00:00
initialized Routine Page
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/navigation/view/widgets/app_body.dart';
|
||||
import 'package:syncrow_app/features/navigation/view/widgets/default_app_bar.dart';
|
||||
import 'package:syncrow_app/features/navigation/view/widgets/default_nav_bar.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/app_layout/view/widgets/app_body.dart';
|
||||
import 'package:syncrow_app/features/app_layout/view/widgets/default_app_bar.dart';
|
||||
import 'package:syncrow_app/features/app_layout/view/widgets/default_nav_bar.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class NavigationView extends StatelessWidget {
|
||||
const NavigationView({super.key});
|
||||
class AppLayout extends StatelessWidget {
|
||||
const AppLayout({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
import '../../../shared_widgets/text_widgets/body_large.dart';
|
||||
|
||||
@ -22,8 +23,12 @@ class AppBarHomeDropdown extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
SvgPicture.asset(
|
||||
IconsManager.home,
|
||||
width: 30,
|
||||
height: 30,
|
||||
width: 25,
|
||||
height: 25,
|
||||
colorFilter: const ColorFilter.mode(
|
||||
ColorsManager.textPrimaryColor,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const Gap(5),
|
||||
const BodyLarge(text: 'Home'),
|
@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
||||
|
||||
class AppBody extends StatelessWidget {
|
||||
@ -24,7 +24,11 @@ class AppBody extends StatelessWidget {
|
||||
opacity: 0.4,
|
||||
),
|
||||
),
|
||||
child: NavCubit.of(context).currentPage,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 60, right: 15, left: 15, bottom: 100),
|
||||
child: NavCubit.of(context).currentPage,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/navigation/view/widgets/app_bar_home_dropdown.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/app_layout/view/widgets/app_bar_home_dropdown.dart';
|
||||
|
||||
class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
const DefaultAppBar({super.key});
|
@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class DefaultNavBar extends StatelessWidget {
|
@ -1,49 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/carbon_emission.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/consumption.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/live_monitor_tab.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/carbon_emission.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/consumption.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/live_monitor_tab.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
|
||||
import 'energy_usage.dart';
|
||||
import 'widgets/energy_usage.dart';
|
||||
|
||||
class DashboardView extends StatelessWidget {
|
||||
const DashboardView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.only(top: 60, right: 15, left: 15, bottom: 100),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
TitleMedium(
|
||||
text: StringsManager.dashboard,
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
return const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
TitleMedium(
|
||||
text: StringsManager.dashboard,
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
LiveMonitorTab(),
|
||||
Gap(10),
|
||||
EnergyUsage(),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Consumption(),
|
||||
Gap(20),
|
||||
CarbonEmission(),
|
||||
],
|
||||
),
|
||||
),
|
||||
LiveMonitorTab(),
|
||||
Gap(10),
|
||||
EnergyUsage(),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Consumption(),
|
||||
Gap(20),
|
||||
CarbonEmission(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/card_title.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/card_title.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/united_text.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/card_title.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/card_title.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/united_text.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/energy_usage_header.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/energy_usage_header.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
||||
|
||||
class EnergyUsage extends StatelessWidget {
|
@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/card_title.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/card_title.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/united_text.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/live_monitor_widget.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/widgets/live_monitor_widget.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
|
@ -18,5 +18,5 @@ class SceneCubit extends Cubit<SceneState> {
|
||||
});
|
||||
}
|
||||
|
||||
var scenes = <SceneModel>[];
|
||||
List<SceneModel> scenes = [];
|
||||
}
|
||||
|
@ -1,7 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/scene_cubit.dart';
|
||||
import 'package:syncrow_app/features/scene/view/widgets/scene_view_no_scenes.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/assets_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
||||
|
||||
class SceneView extends StatelessWidget {
|
||||
const SceneView({super.key});
|
||||
@ -12,9 +18,99 @@ class SceneView extends StatelessWidget {
|
||||
create: (BuildContext context) => SceneCubit(),
|
||||
child: BlocBuilder<SceneCubit, SceneState>(
|
||||
builder: (context, state) {
|
||||
return state is SceneLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: const SceneViewNoScenes();
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const TitleMedium(
|
||||
text: StringsManager.routine,
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const Gap(20),
|
||||
const BodySmall(
|
||||
text: StringsManager.tapToRunRoutine,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
),
|
||||
child: DefaultContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
height: 50,
|
||||
width: 50,
|
||||
IconsManager.summerMode,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
const Icon(
|
||||
Icons.play_circle,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
],
|
||||
),
|
||||
const BodyMedium(
|
||||
text: StringsManager.summerMode,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
),
|
||||
child: DefaultContainer(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
height: 50,
|
||||
width: 50,
|
||||
IconsManager.winterMode,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
const Icon(
|
||||
Icons.play_circle,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
)
|
||||
],
|
||||
),
|
||||
const BodyMedium(
|
||||
text: StringsManager.winterMode,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
@ -10,6 +10,9 @@ class BodyMedium extends StatelessWidget {
|
||||
this.maxLines,
|
||||
this.overflow,
|
||||
this.textAlign,
|
||||
this.fontSize,
|
||||
this.fontColor,
|
||||
this.fontWeight,
|
||||
});
|
||||
|
||||
final String text;
|
||||
@ -18,11 +21,17 @@ class BodyMedium extends StatelessWidget {
|
||||
final TextOverflow? overflow;
|
||||
|
||||
final TextAlign? textAlign;
|
||||
final double? fontSize;
|
||||
|
||||
final Color? fontColor;
|
||||
final FontWeight? fontWeight;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? context.bodyMedium,
|
||||
style: style ??
|
||||
context.bodyMedium.copyWith(
|
||||
fontSize: fontSize, color: fontColor, fontWeight: fontWeight),
|
||||
// softWrap: true,
|
||||
maxLines: maxLines,
|
||||
// overflow: overflow,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
|
||||
import 'package:syncrow_app/features/navigation/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/nav_cubit.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/theme_manager.dart';
|
||||
|
||||
@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
|
||||
onGenerateRoute: router.Router.generateRoute,
|
||||
initialRoute: Routes.splash,
|
||||
themeMode: ThemeMode.system,
|
||||
theme: myTheme,
|
||||
theme: ThemeManager.selectTheme(),
|
||||
supportedLocales: const [
|
||||
Locale('en', ''), // English, no country code
|
||||
Locale('ar', ''), // Arabic, no country code
|
||||
|
@ -3,7 +3,7 @@ import 'package:syncrow_app/features/auth/view/auth_view.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/dashboard_view.dart';
|
||||
import 'package:syncrow_app/features/devices/view/devices_view.dart';
|
||||
import 'package:syncrow_app/features/layout/view/layout_view.dart';
|
||||
import 'package:syncrow_app/features/navigation/view/navigation_view.dart';
|
||||
import 'package:syncrow_app/features/app_layout/view/app_layout.dart';
|
||||
import 'package:syncrow_app/features/profile/view/profile_view.dart';
|
||||
import 'package:syncrow_app/features/scene/view/scene_view.dart';
|
||||
import 'package:syncrow_app/features/splash/view/splash_view.dart';
|
||||
@ -43,7 +43,7 @@ class Router {
|
||||
|
||||
case Routes.homeRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const NavigationView(), settings: settings);
|
||||
builder: (_) => const AppLayout(), settings: settings);
|
||||
|
||||
default:
|
||||
return MaterialPageRoute(
|
||||
|
@ -41,9 +41,7 @@ abstract class IconsManager {
|
||||
static const String doorLock = '$base/Door Lock.svg';
|
||||
static const String gateway = '$base/Gateway.svg';
|
||||
static const String light = '$base/Light.svg';
|
||||
static const String summerMode = '$base/Hot 1.jpg';
|
||||
static const String winterMode = '$base/Winter 1.jpg';
|
||||
static const String screen = '$base/Screen.svg';
|
||||
}
|
||||
|
||||
abstract class VideosManager {
|
||||
// static const String registrationVideo = 'assets/videos/video.mp4';
|
||||
}
|
||||
|
@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
|
||||
|
||||
abstract class ColorsManager {
|
||||
static const Color textPrimaryColor = Color(0xFF5D5D5D);
|
||||
static const Color primaryColor = Color(0xFF023dfe);
|
||||
static const Color secondaryColor = Colors.white;
|
||||
static const Color primaryColor = Color(0xFF0030CB);
|
||||
static const Color onPrimaryColor = Colors.white;
|
||||
static const Color secondaryColor = Color(0xFF023DFE);
|
||||
static const Color onSecondaryColor = Color(0xFF023DFE);
|
||||
static const Color primaryTextColor = Colors.black;
|
||||
|
||||
static const Color greyColor = Color(0xFFd9d9d9);
|
||||
|
@ -6,6 +6,8 @@ class StringsManager {
|
||||
|
||||
static const dashboard = 'Dashboard';
|
||||
static const devices = 'Devices';
|
||||
static const routine = 'Routines';
|
||||
static const tapToRunRoutine = 'Tap to run routine';
|
||||
static const wizard = 'Wizard';
|
||||
static const active = 'Active';
|
||||
static const current = 'Current';
|
||||
@ -17,5 +19,7 @@ class StringsManager {
|
||||
static const emissions = 'Emissions';
|
||||
static const reductions = 'Reductions';
|
||||
static const winter = 'Winter';
|
||||
static const winterMode = 'Winter Mode';
|
||||
static const summer = 'Summer';
|
||||
static const summerMode = 'Summer Mode';
|
||||
}
|
||||
|
@ -3,154 +3,336 @@ import 'package:flutter/material.dart';
|
||||
import 'color_manager.dart';
|
||||
import 'font_manager.dart';
|
||||
|
||||
ThemeData myTheme = ThemeData(
|
||||
///main colors
|
||||
primaryColor: ColorsManager.primaryColor,
|
||||
// colorScheme: ColorsManager.lightColorScheme,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
abstract class ThemeManager {
|
||||
static bool isDarkTheme = false;
|
||||
|
||||
///text theme
|
||||
textTheme: const TextTheme(
|
||||
///display
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s35,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
static ThemeData selectTheme() => isDarkTheme ? darkTheme : lightTheme;
|
||||
static ThemeData lightTheme = ThemeData(
|
||||
///main colors
|
||||
primaryColor: ColorsManager.primaryColor,
|
||||
colorScheme: const ColorScheme(
|
||||
background: ColorsManager.backgroundColor,
|
||||
brightness: Brightness.light,
|
||||
primary: ColorsManager.primaryColor,
|
||||
onPrimary: ColorsManager.onPrimaryColor,
|
||||
secondary: ColorsManager.secondaryColor,
|
||||
onSecondary: ColorsManager.onSecondaryColor,
|
||||
error: Colors.red,
|
||||
onError: Colors.white,
|
||||
onBackground: ColorsManager.textPrimaryColor,
|
||||
surface: Colors.white,
|
||||
onSurface: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s20,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
|
||||
///text theme
|
||||
textTheme: const TextTheme(
|
||||
///display
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s35,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s20,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///title
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s48,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s30,
|
||||
fontWeight: FontsManager.bold,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s25,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///body
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s12,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
|
||||
///title
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s48,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s30,
|
||||
fontWeight: FontsManager.bold,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s25,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
///button theme
|
||||
// buttonTheme: ButtonThemeData(
|
||||
// buttonColor: ColorsManager.primaryLightColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: AppPadding.p8),
|
||||
// textTheme: ButtonTextTheme.primary,
|
||||
// hoverColor: ColorsManager.primaryDarkColor,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// ),),
|
||||
//
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: ButtonStyle(
|
||||
// backgroundColor:
|
||||
// MaterialStateProperty.all<Color>(ColorsManager.primaryLightColor),
|
||||
// padding: MaterialStateProperty.all<EdgeInsets>(
|
||||
// const EdgeInsets.all(AppPadding.p8),),
|
||||
// textStyle: MaterialStateProperty.all<TextStyle>(
|
||||
// const TextStyle(
|
||||
// fontFamily: FontsManager.fontFamily,
|
||||
// fontSize: FontSize.s16,
|
||||
// fontWeight: FontsManager.regular,
|
||||
// color: ColorsManager.onPrimaryLightColor,
|
||||
// ),
|
||||
// ),
|
||||
// // shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
// // RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// // side: const BorderSide(color: Colors.grey),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
///input decoration theme
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: ColorsManager.primaryColor),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
color: Colors.grey,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
),
|
||||
),
|
||||
|
||||
///body
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
///card theme
|
||||
//TODO edit card theme
|
||||
cardTheme: const CardTheme(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
);
|
||||
|
||||
//TODO implement dark theme
|
||||
static ThemeData darkTheme = ThemeData(
|
||||
///main colors
|
||||
primaryColor: ColorsManager.primaryColor,
|
||||
colorScheme: const ColorScheme(
|
||||
background: ColorsManager.backgroundColor,
|
||||
brightness: Brightness.light,
|
||||
primary: ColorsManager.primaryColor,
|
||||
onPrimary: ColorsManager.onPrimaryColor,
|
||||
secondary: ColorsManager.secondaryColor,
|
||||
onSecondary: ColorsManager.onSecondaryColor,
|
||||
error: Colors.red,
|
||||
onError: Colors.white,
|
||||
onBackground: ColorsManager.textPrimaryColor,
|
||||
surface: Colors.white,
|
||||
onSurface: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s12,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
|
||||
///text theme
|
||||
textTheme: const TextTheme(
|
||||
///display
|
||||
displayLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s35,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displayMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s20,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
displaySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///title
|
||||
titleLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s48,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s30,
|
||||
fontWeight: FontsManager.bold,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s25,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
///body
|
||||
bodyLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
bodySmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s12,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
|
||||
labelLarge: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s18,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelMedium: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
labelSmall: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontSize: FontSize.s14,
|
||||
fontWeight: FontsManager.regular,
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
),
|
||||
),
|
||||
///button theme
|
||||
// buttonTheme: ButtonThemeData(
|
||||
// buttonColor: ColorsManager.primaryLightColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: AppPadding.p8),
|
||||
// textTheme: ButtonTextTheme.primary,
|
||||
// hoverColor: ColorsManager.primaryDarkColor,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// ),),
|
||||
//
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: ButtonStyle(
|
||||
// backgroundColor:
|
||||
// MaterialStateProperty.all<Color>(ColorsManager.primaryLightColor),
|
||||
// padding: MaterialStateProperty.all<EdgeInsets>(
|
||||
// const EdgeInsets.all(AppPadding.p8),),
|
||||
// textStyle: MaterialStateProperty.all<TextStyle>(
|
||||
// const TextStyle(
|
||||
// fontFamily: FontsManager.fontFamily,
|
||||
// fontSize: FontSize.s16,
|
||||
// fontWeight: FontsManager.regular,
|
||||
// color: ColorsManager.onPrimaryLightColor,
|
||||
// ),
|
||||
// ),
|
||||
// // shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
// // RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// // side: const BorderSide(color: Colors.grey),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
///button theme
|
||||
// buttonTheme: ButtonThemeData(
|
||||
// buttonColor: ColorsManager.primaryLightColor,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: AppPadding.p8),
|
||||
// textTheme: ButtonTextTheme.primary,
|
||||
// hoverColor: ColorsManager.primaryDarkColor,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// ),),
|
||||
//
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: ButtonStyle(
|
||||
// backgroundColor:
|
||||
// MaterialStateProperty.all<Color>(ColorsManager.primaryLightColor),
|
||||
// padding: MaterialStateProperty.all<EdgeInsets>(
|
||||
// const EdgeInsets.all(AppPadding.p8),),
|
||||
// textStyle: MaterialStateProperty.all<TextStyle>(
|
||||
// const TextStyle(
|
||||
// fontFamily: FontsManager.fontFamily,
|
||||
// fontSize: FontSize.s16,
|
||||
// fontWeight: FontsManager.regular,
|
||||
// color: ColorsManager.onPrimaryLightColor,
|
||||
// ),
|
||||
// ),
|
||||
// // shape: MaterialStateProperty.all<OutlinedBorder>(
|
||||
// // RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.circular(AppRadius.r4),
|
||||
// // side: const BorderSide(color: Colors.grey),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
///input decoration theme
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: ColorsManager.primaryColor),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
color: Colors.grey,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
),
|
||||
),
|
||||
|
||||
///input decoration theme
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
///card theme
|
||||
//TODO edit card theme
|
||||
cardTheme: const CardTheme(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: ColorsManager.primaryColor),
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
color: Colors.grey,
|
||||
fontSize: FontSize.s16,
|
||||
fontWeight: FontsManager.regular,
|
||||
),
|
||||
),
|
||||
|
||||
///card theme
|
||||
//TODO edit card theme
|
||||
cardTheme: const CardTheme(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user