desktop layout

This commit is contained in:
julian 2023-07-26 16:08:01 -06:00
parent 0175939d63
commit 9d2b315bd9

View file

@ -206,9 +206,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
//edit for desktop //edit for desktop
return Background( return Background(
child: Stack( child: ConditionalParent(
children: [
ConditionalParent(
condition: isDesktop, condition: isDesktop,
builder: (child) => DesktopScaffold( builder: (child) => DesktopScaffold(
appBar: DesktopAppBar( appBar: DesktopAppBar(
@ -316,25 +314,31 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
child: ConditionalParent( child: ConditionalParent(
condition: isDesktop, condition: isDesktop,
builder: (child) => SizedBox( builder: (child) => SizedBox(
width: 300, width: 318,
height: 300,
child: child, child: child,
), ),
child: ConditionalParent( child: ConditionalParent(
condition: imageBytes != null, condition: imageBytes != null,
builder: (child) => Column( builder: (_) => Column(
children: [ children: [
const Spacer( isDesktop
? const SizedBox(
height: 50,
)
: const Spacer(
flex: 1, flex: 1,
), ),
if (imageBytes != null) if (imageBytes != null)
SizedBox( SizedBox(
width: 300, width: 300,
height: 300, height: 300,
child: child: SvgPicture.memory(Uint8List.fromList(imageBytes)),
SvgPicture.memory(Uint8List.fromList(imageBytes)),
), ),
const Spacer( isDesktop
? const SizedBox(
height: 50,
)
: const Spacer(
flex: 1, flex: 1,
), ),
Padding( Padding(
@ -374,7 +378,11 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
), ),
child: Column( child: Column(
children: [ children: [
const Spacer( isDesktop
? const SizedBox(
height: 100,
)
: const Spacer(
flex: 4, flex: 4,
), ),
Center( Center(
@ -391,7 +399,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
), ),
), ),
const SizedBox( const SizedBox(
height: 40, height: 70,
), ),
Text( Text(
"You do not have a MonKey yet. \nFetch yours now!", "You do not have a MonKey yet. \nFetch yours now!",
@ -405,7 +413,11 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
], ],
), ),
), ),
const Spacer( isDesktop
? const SizedBox(
height: 50,
)
: const Spacer(
flex: 6, flex: 6,
), ),
Padding( Padding(
@ -445,8 +457,6 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
), ),
), ),
), ),
],
),
); );
} }
} }