Floating button theme

main_design2.0
zaid_daoud 2 years ago
parent 95eac4b196
commit 22e3067d05

@ -9,7 +9,12 @@ class AppThemes {
indicatorColor: AppColor.primary50,
scaffoldBackgroundColor: AppColor.backgroundLight,
colorScheme: const ColorScheme.light(primary: AppColor.primary50, onPrimary: Colors.white, secondary: Colors.white, onSecondary: AppColor.neutral70),
floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: AppColor.backgroundDark),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
elevation: 0,
iconSize: 46,
backgroundColor: AppColor.primary70,
foregroundColor: AppColor.neutral30,
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
type: BottomNavigationBarType.fixed,
unselectedLabelStyle: ThemeData.light().textTheme.bodySmall?.copyWith(fontWeight: FontWeight.w500),
@ -32,7 +37,12 @@ class AppThemes {
indicatorColor: AppColor.primary50,
scaffoldBackgroundColor: AppColor.backgroundDark,
colorScheme: const ColorScheme.light(primary: AppColor.primary50, onPrimary: AppColor.neutral60, secondary: AppColor.neutral60, onSecondary: Colors.white),
floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: AppColor.primary40),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
elevation: 0,
iconSize: 46,
backgroundColor: AppColor.primary40,
foregroundColor: AppColor.neutral50,
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
type: BottomNavigationBarType.fixed,
unselectedLabelStyle: ThemeData.dark().textTheme.bodySmall?.copyWith(fontWeight: FontWeight.w500),

@ -1,18 +0,0 @@
import 'package:flutter/material.dart';
import 'package:test_sa/extensions/context_extension.dart';
import '../app_style/app_color.dart';
class AppFloatingButton extends StatelessWidget {
final IconData icon;
final VoidCallback onPressed;
const AppFloatingButton({Key key, @required this.icon, @required this.onPressed}) : super(key: key);
@override
Widget build(BuildContext context) {
return FloatingActionButton(
onPressed: onPressed,
child: Icon(icon, color: context.isDark ? AppColor.neutral50 : AppColor.neutral30),
);
}
}

@ -9,7 +9,6 @@ import 'package:test_sa/new_views/pages/land_page/my_requests_page.dart';
import '../../common_widgets/app_bottom_nav_bar.dart';
import '../../common_widgets/app_drawer.dart';
import '../../common_widgets/app_floating_button.dart';
import 'contact_us_bottom_sheet.dart';
import 'dashboard_page.dart';
@ -59,8 +58,8 @@ class _LandPageState extends State<LandPage> {
child: _pages[currentPageIndex],
),
drawer: const AppDrawer(),
floatingActionButton: AppFloatingButton(
icon: Icons.add,
floatingActionButton: FloatingActionButton(
child: const Icon(Icons.add),
onPressed: () {},
),
bottomNavigationBar: AppBottomNavigationBar(

Loading…
Cancel
Save