Skip to content
Snippets Groups Projects
Select Git revision
  • bbf0abd5457d42678882384216af9e83c38549bc
  • master default protected
  • 21-add-onlongpress-with-popup-on-parameters
  • 23-center-vertically-buttons
  • 30-highlight-bin-when-selecting-disabled-item
  • 1.0.7 protected
  • 1.0.6 protected
  • 1.0.5 protected
  • 1.0.4 protected
  • 1.0.3 protected
  • 1.0.2 protected
  • 1.0.0 protected
  • 0.9.1 protected
  • 0.9.0 protected
  • 0.8.4 protected
  • 0.8.3 protected
  • 0.8.2 protected
  • 0.8.1 protected
  • 0.8.0 protected
  • 0.7.0 protected
  • 0.6.1 protected
  • 0.6.0 protected
  • 0.5.0 protected
  • 0.4.0 protected
  • 0.3.0 protected
25 results

application_settings_theme_card.dart

Blame
  • settings_form.dart 1.65 KiB
    import 'package:easy_localization/easy_localization.dart';
    import 'package:flutter/material.dart';
    import 'package:unicons/unicons.dart';
    
    import 'package:memory/ui/settings/theme_card.dart';
    
    class SettingsForm extends StatefulWidget {
      const SettingsForm({super.key});
    
      @override
      State<SettingsForm> createState() => _SettingsFormState();
    }
    
    class _SettingsFormState extends State<SettingsForm> {
      @override
      void dispose() {
        super.dispose();
      }
    
      @override
      void didChangeDependencies() {
        super.didChangeDependencies();
      }
    
      @override
      Widget build(BuildContext context) {
        return Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisSize: MainAxisSize.max,
          children: <Widget>[
            // Light/dark theme
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                const Text('settings_label_theme').tr(),
                const Row(
                  mainAxisAlignment: MainAxisAlignment.end,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    ThemeCard(
                      mode: ThemeMode.system,
                      icon: UniconsLine.cog,
                    ),
                    ThemeCard(
                      mode: ThemeMode.light,
                      icon: UniconsLine.sun,
                    ),
                    ThemeCard(
                      mode: ThemeMode.dark,
                      icon: UniconsLine.moon,
                    )
                  ],
                ),
              ],
            ),
    
            const SizedBox(height: 16),
          ],
        );
      }
    }