You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansu_ui/lib/theme/as_theme.dart

58 lines
1.9 KiB

4 years ago
import 'package:ansu_ui/styles/as_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ASTheme {
static init() {
SystemChrome.setSystemUIOverlayStyle(defaultSystemStyle);
}
static SystemUiOverlayStyle get defaultSystemStyle => SystemUiOverlayStyle(
4 years ago
systemNavigationBarColor: kBackgroundColor,
4 years ago
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.light,
);
4 years ago
static SystemUiOverlayStyle get yellow =>
defaultSystemStyle.copyWith(systemNavigationBarColor: kPrimaryColor);
4 years ago
static ThemeData get lightTheme =>
ThemeData(primarySwatch: Colors.yellow).copyWith(
4 years ago
textTheme: ThemeData.light().textTheme.apply(
displayColor: Color(0xFF333333),
bodyColor: Color(0xFF333333),
),
inputDecorationTheme: InputDecorationTheme(),
4 years ago
primaryColor: kPrimaryColor,
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
foregroundColor: MaterialStateProperty.all(kPrimaryColor),
overlayColor:
MaterialStateProperty.all(kPrimaryColor.withOpacity(0.2)),
padding: MaterialStateProperty.all(
EdgeInsets.symmetric(horizontal: 20.w),
),
textStyle: MaterialStateProperty.all(TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500,
)),
),
),
appBarTheme: AppBarTheme(
brightness: Brightness.light,
backgroundColor: kForegroundColor,
elevation: 0,
centerTitle: true,
textTheme: TextTheme(
headline6: TextStyle(
color: kTextColor,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
),
),
);
}