From dd6d4f0f15374438971c65a4127557e0633b4a59 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 9 May 2021 22:05:25 +0200 Subject: [PATCH] Use deprecated FlatButton.icon The newer TextButton.icon uses some of the new styles which I cannot seem to figure out exactly, so for this release lets just use the old button. --- lib/app.dart | 21 ++++++++++++++++++++- lib/editors/bottom_bar.dart | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index dbc3f61d..b3cd4021 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -294,6 +294,25 @@ class _JournalAppState extends State { var appSettings = Provider.of(context); var router = AppRouter(settings: settings, appSettings: appSettings); + /* + const FlexSchemeData customFlexScheme = FlexSchemeData( + name: 'Toledo purple', + description: 'Purple theme created from custom defined colors.', + light: FlexSchemeColor( + primary: Color(0xFF66bb6a), + primaryVariant: Color(0xFF338a3e), + secondary: Color(0xff6d4c41), + secondaryVariant: Color(0xFF338a3e), + ), + dark: FlexSchemeColor( + primary: Color(0xff212121), + primaryVariant: Color(0xffc8635f), + secondary: Color(0xff689f38), + secondaryVariant: Color(0xff00be00), + ), + ); + */ + return MaterialApp( key: const ValueKey("App"), navigatorKey: _navigatorKey, @@ -303,7 +322,7 @@ class _JournalAppState extends State { supportedLocales: EasyLocalization.of(context).supportedLocales, locale: EasyLocalization.of(context).locale, - theme: FlexColorScheme.light(scheme: FlexScheme.green).toTheme, + theme: Themes.light, darkTheme: Themes.dark, themeMode: settings.theme.toThemeMode(), diff --git a/lib/editors/bottom_bar.dart b/lib/editors/bottom_bar.dart index a7135cd1..40d88658 100644 --- a/lib/editors/bottom_bar.dart +++ b/lib/editors/bottom_bar.dart @@ -97,7 +97,7 @@ class EditorBottomBar extends StatelessWidget { icon: const Icon(Icons.undo), onPressed: undoAllowed ? onUndoSelected : null, ), - TextButton.icon( + FlatButton.icon( icon: const Icon(Icons.folder), label: Text(parentFolder.publicName), onPressed: () {