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 class _AppearanceOptionSettings
extends ConsumerState<AppearanceOptionSettings> { extends ConsumerState<AppearanceOptionSettings> {
// late bool isLight;
// @override
// void initState() {
//
// super.initState();
// }
//
// @override
// void dispose() {
// super.dispose();
// }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType"); debugPrint("BUILD: $runtimeType");
@ -127,13 +140,7 @@ class _AppearanceOptionSettings
], ],
), ),
), ),
const Padding( ThemeToggle(),
padding: EdgeInsets.only(
left: 10,
right: 10,
),
child: ThemeToggle(),
),
], ],
), ),
), ),
@ -169,11 +176,26 @@ class _ThemeToggle extends State<ThemeToggle> {
elevation: 0, elevation: 0,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
shape: RoundedRectangleBorder( 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( borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius * 2, Constants.size.circularBorderRadius * 2,
), ),
), ),
onPressed: () {}, //onPressed onPressed: () {}, //onPressed
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack( child: Stack(
children: [ children: [
Column( Column(
@ -194,8 +216,8 @@ class _ThemeToggle extends State<ThemeToggle> {
), ),
child: Text( child: Text(
"Light", "Light",
style: style: STextStyles.desktopTextExtraSmall(context)
STextStyles.desktopTextExtraSmall(context).copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.textDark, .textDark,
@ -219,8 +241,8 @@ class _ThemeToggle extends State<ThemeToggle> {
), ),
// if (!externalCallsEnabled) // if (!externalCallsEnabled)
// Positioned( // Positioned(
// top: 4, // bottom: 0,
// right: 4, // left: 6,
// child: Container( // child: Container(
// width: 20, // width: 20,
// height: 20, // height: 20,
@ -236,6 +258,7 @@ class _ThemeToggle extends State<ThemeToggle> {
), ),
), ),
), ),
),
const SizedBox( const SizedBox(
width: 1, width: 1,
), ),
@ -246,11 +269,21 @@ class _ThemeToggle extends State<ThemeToggle> {
elevation: 0, elevation: 0,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
// side: !externalCallsEnabled
// ? BorderSide.none
// : BorderSide(
// color: Theme.of(context)
// .extension<StackColors>()!
// .infoItemIcons,
// width: 2,
// ),
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius * 2, Constants.size.circularBorderRadius * 2,
), ),
), ),
onPressed: () {}, //onPressed onPressed: () {}, //onPressed
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack( child: Stack(
children: [ children: [
Column( Column(
@ -261,7 +294,7 @@ class _ThemeToggle extends State<ThemeToggle> {
), ),
Padding( Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 50, left: 45,
top: 12, top: 12,
), ),
child: Text( child: Text(
@ -277,38 +310,39 @@ class _ThemeToggle extends State<ThemeToggle> {
], ],
), ),
// if (externalCallsEnabled) // 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( Positioned(
bottom: 0, bottom: 0,
left: 0, left: 0,
child: SvgPicture.asset( child: Container(
Assets.svg.checkCircle,
width: 20, width: 20,
height: 20, height: 20,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(1000),
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .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,
// ),
// ),
// ),
], ],
), ),
), ),
), ),
), ),
),
], ],
); );
} }