WIP: theme change

This commit is contained in:
ryleedavis 2022-11-04 17:50:51 -06:00
parent a5d7723dee
commit e06910a34a

View file

@ -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,11 +176,26 @@ 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: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
children: [
Column(
@ -194,8 +216,8 @@ class _ThemeToggle extends State<ThemeToggle> {
),
child: Text(
"Light",
style:
STextStyles.desktopTextExtraSmall(context).copyWith(
style: STextStyles.desktopTextExtraSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
@ -219,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,
@ -236,6 +258,7 @@ class _ThemeToggle extends State<ThemeToggle> {
),
),
),
),
const SizedBox(
width: 1,
),
@ -246,11 +269,21 @@ class _ThemeToggle extends State<ThemeToggle> {
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(
@ -261,7 +294,7 @@ class _ThemeToggle extends State<ThemeToggle> {
),
Padding(
padding: const EdgeInsets.only(
left: 50,
left: 45,
top: 12,
),
child: Text(
@ -277,38 +310,39 @@ class _ThemeToggle extends State<ThemeToggle> {
],
),
// 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: SvgPicture.asset(
Assets.svg.checkCircle,
child: Container(
width: 20,
height: 20,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(1000),
color: Theme.of(context)
.extension<StackColors>()!
.infoItemIcons,
.textFieldDefaultBG,
),
),
),
// 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,
// ),
// ),
// ),
],
),
),
),
),
),
],
);
}