mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-23 19:05:51 +00:00
WIP: theme change
This commit is contained in:
parent
a5d7723dee
commit
e06910a34a
1 changed files with 125 additions and 91 deletions
|
@ -23,6 +23,19 @@ class AppearanceOptionSettings extends ConsumerStatefulWidget {
|
|||
|
||||
class _AppearanceOptionSettings
|
||||
extends ConsumerState<AppearanceOptionSettings> {
|
||||
// late bool isLight;
|
||||
|
||||
// @override
|
||||
// void initState() {
|
||||
//
|
||||
// super.initState();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// void dispose() {
|
||||
// super.dispose();
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
debugPrint("BUILD: $runtimeType");
|
||||
|
@ -127,13 +140,7 @@ class _AppearanceOptionSettings
|
|||
],
|
||||
),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 10,
|
||||
right: 10,
|
||||
),
|
||||
child: ThemeToggle(),
|
||||
),
|
||||
ThemeToggle(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -169,95 +176,38 @@ class _ThemeToggle extends State<ThemeToggle> {
|
|||
elevation: 0,
|
||||
hoverColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color:
|
||||
Theme.of(context).extension<StackColors>()!.infoItemIcons,
|
||||
width: 2,
|
||||
),
|
||||
// side: !externalCallsEnabled
|
||||
// ? BorderSide.none
|
||||
// : BorderSide(
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .infoItemIcons,
|
||||
// width: 2,
|
||||
// ),
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius * 2,
|
||||
),
|
||||
),
|
||||
onPressed: () {}, //onPressed
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.themeLight,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 50,
|
||||
top: 12,
|
||||
),
|
||||
child: Text(
|
||||
"Light",
|
||||
style:
|
||||
STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
// if (externalCallsEnabled)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 6,
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.checkCircle,
|
||||
width: 20,
|
||||
height: 20,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.infoItemIcons,
|
||||
),
|
||||
),
|
||||
// if (!externalCallsEnabled)
|
||||
// Positioned(
|
||||
// top: 4,
|
||||
// right: 4,
|
||||
// child: Container(
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(1000),
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .textFieldDefaultBG,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 1,
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: RawMaterialButton(
|
||||
elevation: 0,
|
||||
hoverColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius * 2,
|
||||
),
|
||||
),
|
||||
onPressed: () {}, //onPressed
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.themeDark,
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.themeLight,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
|
@ -265,7 +215,7 @@ class _ThemeToggle extends State<ThemeToggle> {
|
|||
top: 12,
|
||||
),
|
||||
child: Text(
|
||||
"Dark",
|
||||
"Light",
|
||||
style: STextStyles.desktopTextExtraSmall(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
|
@ -273,13 +223,13 @@ class _ThemeToggle extends State<ThemeToggle> {
|
|||
.textDark,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
// if (externalCallsEnabled)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
left: 6,
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.checkCircle,
|
||||
width: 20,
|
||||
|
@ -291,8 +241,8 @@ class _ThemeToggle extends State<ThemeToggle> {
|
|||
),
|
||||
// if (!externalCallsEnabled)
|
||||
// Positioned(
|
||||
// top: 4,
|
||||
// right: 4,
|
||||
// bottom: 0,
|
||||
// left: 6,
|
||||
// child: Container(
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
|
@ -309,6 +259,90 @@ class _ThemeToggle extends State<ThemeToggle> {
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 1,
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: RawMaterialButton(
|
||||
elevation: 0,
|
||||
hoverColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
// side: !externalCallsEnabled
|
||||
// ? BorderSide.none
|
||||
// : BorderSide(
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .infoItemIcons,
|
||||
// width: 2,
|
||||
// ),
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius * 2,
|
||||
),
|
||||
),
|
||||
onPressed: () {}, //onPressed
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.themeDark,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 45,
|
||||
top: 12,
|
||||
),
|
||||
child: Text(
|
||||
"Dark",
|
||||
style: STextStyles.desktopTextExtraSmall(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// if (externalCallsEnabled)
|
||||
// Positioned(
|
||||
// bottom: 0,
|
||||
// left: 0,
|
||||
// child: SvgPicture.asset(
|
||||
// Assets.svg.checkCircle,
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .infoItemIcons,
|
||||
// ),
|
||||
// ),
|
||||
// if (!externalCallsEnabled)
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
child: Container(
|
||||
width: 20,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(1000),
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFieldDefaultBG,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue