mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 19:26:37 +00:00
add fruit theme button to appearance settings
This commit is contained in:
parent
d25b757a22
commit
bd80ad4ef4
1 changed files with 82 additions and 0 deletions
|
@ -7,6 +7,7 @@ import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||||
import 'package:stackwallet/utilities/theme/dark_colors.dart';
|
import 'package:stackwallet/utilities/theme/dark_colors.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/fruit_sorbet_theme.dart';
|
||||||
import 'package:stackwallet/utilities/theme/light_colors.dart';
|
import 'package:stackwallet/utilities/theme/light_colors.dart';
|
||||||
import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart';
|
import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart';
|
||||||
import 'package:stackwallet/utilities/theme/oled_black_colors.dart';
|
import 'package:stackwallet/utilities/theme/oled_black_colors.dart';
|
||||||
|
@ -516,6 +517,87 @@ class _ThemeOptionsView extends ConsumerState<ThemeOptionsView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
MaterialButton(
|
||||||
|
splashColor: Colors.transparent,
|
||||||
|
hoverColor: Colors.transparent,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
Constants.size.circularBorderRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
DB.instance.put<dynamic>(
|
||||||
|
boxName: DB.boxNameTheme,
|
||||||
|
key: "colorScheme",
|
||||||
|
value: ThemeType.fruitSorbet.name,
|
||||||
|
);
|
||||||
|
ref.read(colorThemeProvider.state).state =
|
||||||
|
StackColors.fromStackColorTheme(
|
||||||
|
FruitSorbetColors(),
|
||||||
|
);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_selectedTheme = "fruitSorbet";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
width: 200,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
child: Radio(
|
||||||
|
activeColor: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.radioButtonIconEnabled,
|
||||||
|
value: "fruitSorbet",
|
||||||
|
groupValue: _selectedTheme,
|
||||||
|
onChanged: (newValue) {
|
||||||
|
if (newValue is String && newValue == "fruitSorbet") {
|
||||||
|
DB.instance.put<dynamic>(
|
||||||
|
boxName: DB.boxNameTheme,
|
||||||
|
key: "colorScheme",
|
||||||
|
value: ThemeType.fruitSorbet.name,
|
||||||
|
);
|
||||||
|
ref.read(colorThemeProvider.state).state =
|
||||||
|
StackColors.fromStackColorTheme(
|
||||||
|
OledBlackColors(),
|
||||||
|
);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_selectedTheme = "fruitSorbet";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 14,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Fruit Sorbet",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue