diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings/appearance_settings_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings/appearance_settings_view.dart index 62c93a7b2..3d7a12ac0 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings/appearance_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings/appearance_settings_view.dart @@ -8,8 +8,11 @@ import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/background.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/custom_buttons/draggable_switch_button.dart'; +import 'package:stackwallet/widgets/desktop/secondary_button.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart'; +import 'manage_themes.dart'; + class AppearanceSettingsView extends ConsumerWidget { const AppearanceSettingsView({Key? key}) : super(key: key); @@ -128,6 +131,14 @@ class AppearanceSettingsView extends ConsumerWidget { padding: EdgeInsets.all(10), child: ThemeOptionsWidget(), ), + SecondaryButton( + label: "Add more themes", + onPressed: () { + Navigator.of(context).pushNamed( + ManageThemesView.routeName, + ); + }, + ) ], ), ], diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings/manage_themes.dart b/lib/pages/settings_views/global_settings_view/appearance_settings/manage_themes.dart new file mode 100644 index 000000000..33d69fe01 --- /dev/null +++ b/lib/pages/settings_views/global_settings_view/appearance_settings/manage_themes.dart @@ -0,0 +1,109 @@ +import 'package:flutter/material.dart'; +import 'package:stackwallet/utilities/text_styles.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/utilities/util.dart'; +import 'package:stackwallet/widgets/conditional_parent.dart'; +import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; +import 'package:stackwallet/widgets/desktop/primary_button.dart'; +import 'package:stackwallet/widgets/rounded_container.dart'; +import 'package:stackwallet/widgets/rounded_white_container.dart'; + +class ManageThemesView extends StatefulWidget { + const ManageThemesView({Key? key}) : super(key: key); + + static const String routeName = "/manageThemes"; + + @override + State createState() => _ManageThemesViewState(); +} + +class _ManageThemesViewState extends State { + @override + Widget build(BuildContext context) { + return ConditionalParent( + condition: !Util.isDesktop, + builder: (child) => Scaffold( + backgroundColor: + Theme.of(context).extension()!.background, + appBar: AppBar( + leading: AppBarBackButton( + onPressed: () { + Navigator.of(context).pop(); + }, + ), + title: Text( + "Settings", + style: STextStyles.navBarTitle(context), + ), + ), + body: LayoutBuilder( + builder: (builderContext, constraints) { + return SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + ), + child: IntrinsicHeight( + child: child, + ), + ), + ); + }, + )), + child: Column( + children: [ + Expanded( + child: GridView.builder( + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( + maxCrossAxisExtent: 100, + ), + itemBuilder: (_, index) { + return Container( + width: 25, + height: 25, + color: Colors.red, + ); + }, + ), + ), + ], + ), + ); + } +} + +class StackThemeCard extends StatefulWidget { + const StackThemeCard({Key? key}) : super(key: key); + + @override + State createState() => _StackThemeCardState(); +} + +class _StackThemeCardState extends State { + String buttonLabel = "Download"; + + @override + Widget build(BuildContext context) { + return RoundedWhiteContainer( + child: Column( + children: [ + RoundedContainer( + color: Colors.grey, + radiusMultiplier: 100, + ), + Text( + "Theme name", + ), + Text( + "10.6 GB (lol)", + ), + PrimaryButton( + label: buttonLabel, + buttonHeight: ButtonHeight.m, + onPressed: () {}, + ), + ], + ), + ); + } +} diff --git a/lib/route_generator.dart b/lib/route_generator.dart index a5bf762af..732d8f9a9 100644 --- a/lib/route_generator.dart +++ b/lib/route_generator.dart @@ -64,6 +64,7 @@ import 'package:stackwallet/pages/settings_views/global_settings_view/about_view import 'package:stackwallet/pages/settings_views/global_settings_view/advanced_views/advanced_settings_view.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/advanced_views/debug_view.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/appearance_settings/appearance_settings_view.dart'; +import 'package:stackwallet/pages/settings_views/global_settings_view/appearance_settings/manage_themes.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/appearance_settings/system_brightness_theme_selection_view.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/currency_view.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/delete_account_view.dart'; @@ -1560,6 +1561,12 @@ class RouteGenerator { builder: (_) => const AppearanceOptionSettings(), settings: RouteSettings(name: settings.name)); + case ManageThemesView.routeName: + return getRoute( + shouldUseMaterialRoute: useMaterialPageRoute, + builder: (_) => const ManageThemesView(), + settings: RouteSettings(name: settings.name)); + case AdvancedSettings.routeName: return getRoute( shouldUseMaterialRoute: useMaterialPageRoute,