diff --git a/lib/screens/settings_experimental.dart b/lib/screens/settings_experimental.dart index 516d0a1d..2ba3202f 100644 --- a/lib/screens/settings_experimental.dart +++ b/lib/screens/settings_experimental.dart @@ -7,7 +7,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:provider/provider.dart'; import 'package:gitjournal/app_settings.dart'; -import 'package:gitjournal/features.dart'; class ExperimentalSettingsScreen extends StatefulWidget { @override diff --git a/lib/widgets/app_drawer_header.dart b/lib/widgets/app_drawer_header.dart index 43a10017..96bd8816 100644 --- a/lib/widgets/app_drawer_header.dart +++ b/lib/widgets/app_drawer_header.dart @@ -11,66 +11,76 @@ class AppDrawerHeader extends StatelessWidget { Widget build(BuildContext context) { var appSettings = Provider.of(context); - return Stack( + var stack = Stack( children: [ - DrawerHeader( - margin: const EdgeInsets.all(0.0), - decoration: BoxDecoration( - color: Theme.of(context).highlightColor, - ), - child: const Padding( - padding: EdgeInsets.all(8.0), - child: DecoratedBox( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage('assets/icon/icon.png'), - ), + const Padding( + padding: EdgeInsets.all(16.0), + child: DecoratedBox( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/icon/icon.png'), ), ), ), ), - /* - Positioned.fill( - child: Align( - alignment: Alignment.centerLeft, - child: IconButton( - padding: const EdgeInsets.all(0), - icon: Icon(Icons.arrow_left, size: 42.0), - onPressed: () {}, - ), - ), - ), - Positioned.fill( - child: Align( - alignment: Alignment.centerRight, - child: IconButton( - padding: const EdgeInsets.all(0), - icon: Icon(Icons.arrow_right, size: 42.0), - onPressed: () {}, - ), - ), - ), - */ if (appSettings.proMode) Positioned.fill( child: Align( alignment: Alignment.bottomRight, - child: ProButton(), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: ProButton(), + ), ), ), Positioned.fill( child: Align( alignment: Alignment.topRight, child: SafeArea( - child: Padding( - padding: const EdgeInsets.fromLTRB(0, 16, 16, 0), - child: ThemeSwitcherButton(), - )), + child: Padding( + padding: const EdgeInsets.fromLTRB(0, 8, 8, 0), + child: ThemeSwitcherButton(), + ), + ), ), ), ], fit: StackFit.passthrough, ); + + /* + var dropdownValue = 'One'; + var repoSelector = DropdownButton( + value: dropdownValue, + icon: const Icon(Icons.arrow_downward), + iconSize: 24, + elevation: 16, + style: const TextStyle(color: Colors.deepPurple), + underline: Container( + height: 2, + color: Colors.deepPurpleAccent, + ), + onChanged: (String newValue) { + dropdownValue = newValue; + }, + items: ['One', 'Two', 'Free', 'Four'] + .map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ); + */ + + return DrawerHeader( + margin: const EdgeInsets.all(0.0), + decoration: BoxDecoration( + color: Theme.of(context).highlightColor, + ), + padding: const EdgeInsets.all(8.0), + child: stack, + ); } } @@ -79,19 +89,16 @@ class ProButton extends StatelessWidget { Widget build(BuildContext context) { var theme = Theme.of(context); - return Padding( - padding: const EdgeInsets.all(16.0), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: theme.scaffoldBackgroundColor, - boxShadow: [ - BoxShadow(color: theme.accentColor, spreadRadius: 0), - ], - ), - padding: const EdgeInsets.all(8.0), - child: Text('PRO', style: theme.textTheme.button), + return Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: theme.scaffoldBackgroundColor, + boxShadow: [ + BoxShadow(color: theme.accentColor, spreadRadius: 0), + ], ), + padding: const EdgeInsets.all(8.0), + child: Text('PRO', style: theme.textTheme.button), ); } }