fix: background

This commit is contained in:
julian 2023-05-11 09:30:15 -06:00
parent b16e96fc6d
commit 7131632044

View file

@ -6,6 +6,7 @@ import 'package:stackwallet/themes/stack_colors.dart';
import 'package:stackwallet/themes/theme_service.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/background.dart';
import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/primary_button.dart';
@ -37,78 +38,81 @@ class _ManageThemesViewState extends ConsumerState<ManageThemesView> {
Widget build(BuildContext context) {
return ConditionalParent(
condition: !Util.isDesktop,
builder: (child) => Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
appBar: AppBar(
leading: AppBarBackButton(
onPressed: () {
Navigator.of(context).pop();
},
builder: (child) => Background(
child: Scaffold(
backgroundColor:
Theme.of(context).extension<StackColors>()!.background,
appBar: AppBar(
leading: AppBarBackButton(
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(
"Add more themes",
style: STextStyles.navBarTitle(context),
),
),
title: Text(
"Add more themes",
style: STextStyles.navBarTitle(context),
),
),
body: _showThemes
? Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
),
child: IntrinsicHeight(
child: child,
),
),
),
),
Padding(
padding: const EdgeInsets.all(16),
child: SecondaryButton(
label: "Install theme file",
onPressed: () {},
),
),
],
)
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(
body: _showThemes
? Column(
children: [
RoundedWhiteContainer(
child: Text(
"You are using Incognito Mode. Please press the"
" button below to load available themes from our server"
" or upload a theme file manually from your device.",
style: STextStyles.smallMed12(context),
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
),
child: IntrinsicHeight(
child: child,
),
),
),
),
const SizedBox(
height: 12,
Padding(
padding: const EdgeInsets.all(16),
child: SecondaryButton(
label: "Install theme file",
onPressed: () {},
),
),
PrimaryButton(
label: "Load themes",
onPressed: () {
setState(() {
_showThemes = true;
future = ref.watch(pThemeService).fetchThemes();
});
},
),
const SizedBox(
height: 12,
),
SecondaryButton(
label: "Install theme file",
onPressed: () {},
),
const Spacer(),
],
)
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(
children: [
RoundedWhiteContainer(
child: Text(
"You are using Incognito Mode. Please press the"
" button below to load available themes from our server"
" or upload a theme file manually from your device.",
style: STextStyles.smallMed12(context),
),
),
const SizedBox(
height: 12,
),
PrimaryButton(
label: "Load themes",
onPressed: () {
setState(() {
_showThemes = true;
future = ref.watch(pThemeService).fetchThemes();
});
},
),
const SizedBox(
height: 12,
),
SecondaryButton(
label: "Install theme file",
onPressed: () {},
),
const Spacer(),
],
),
),
),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,