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

59 lines
2.0 KiB

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(
systemNavigationBarColor: kBackgroundColor,
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.light,
);
static SystemUiOverlayStyle get yellow =>
defaultSystemStyle.copyWith(systemNavigationBarColor: kPrimaryColor);
static ThemeData get lightTheme =>
ThemeData(primarySwatch: Colors.yellow).copyWith(
textTheme: ThemeData.light().textTheme.apply(
displayColor: Color(0xFF333333),
bodyColor: Color(0xFF333333),
fontFamily: 'NotoSansSC',
),
inputDecorationTheme: InputDecorationTheme(),
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,
),
),
),
);
}