feat: adding the new layout to the landing page (#421)

* feat: adding the new layout to the landing page

* fix: lint

Co-authored-by: Tom Arra <tarra3@gmail.com>
This commit is contained in:
Erick
2023-01-23 18:34:03 -03:00
committed by GitHub
parent 8496beb2b3
commit 4364da41b8
3 changed files with 69 additions and 51 deletions

View File

@ -73,28 +73,31 @@ class FullFooter extends StatelessWidget {
);
},
large: (context, child) {
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: 32,
vertical: 24,
),
child: Row(
children: [
for (final icon in icons) ...[
icon,
gap,
],
Expanded(
child: Align(
alignment: Alignment.centerRight,
child: child,
return Align(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 32,
vertical: 24,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
for (final icon in icons) ...[
icon,
gap,
],
Expanded(
child: Align(
alignment: Alignment.bottomRight,
child: child,
),
),
),
if (!_platformHelper.isMobile) ...[
gap,
const MuteButton(),
if (!_platformHelper.isMobile) ...[
gap,
const MuteButton(),
],
],
],
),
),
);
},

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:holobooth/footer/footer.dart';
import 'package:holobooth/landing/landing.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
@ -21,19 +20,14 @@ class LandingView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Stack(
children: [
const Positioned.fill(
children: const [
Positioned.fill(
child: LandingBackground(),
),
Positioned.fill(
child: Column(
children: [
const Expanded(child: LandingBody()),
FullFooter(showIconsForSmall: false),
],
),
child: LandingBody(),
),
const Positioned(
Positioned(
bottom: 100,
right: 0,
child: ClassicPhotoboothBanner(),

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:holobooth/assets/assets.dart';
import 'package:holobooth/footer/footer.dart';
import 'package:holobooth/l10n/l10n.dart';
import 'package:holobooth/landing/landing.dart';
import 'package:holobooth_ui/holobooth_ui.dart';
@ -24,21 +25,36 @@ class _SmallLandingBody extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
children: [
const SizedBox(height: 46),
const _LandingBodyContent(smallScreen: true),
const SizedBox(height: 34),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Assets.backgrounds.holobooth.image(
key: LandingBody.landingPageImageKey,
return CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
children: const [
SizedBox(height: 46),
_LandingBodyContent(smallScreen: true),
SizedBox(height: 34),
],
),
),
],
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Assets.backgrounds.holobooth.image(
key: LandingBody.landingPageImageKey,
),
),
FullFooter(showIconsForSmall: false),
],
),
),
],
);
}
}
@ -49,15 +65,16 @@ class _LargeLandingBody extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Align(
child: SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
children: [
Row(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
flex: 7,
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.center,
alignment: Alignment.bottomCenter,
child: Assets.backgrounds.holobooth.image(
key: LandingBody.landingPageImageKey,
),
@ -69,8 +86,12 @@ class _LargeLandingBody extends StatelessWidget {
),
],
),
],
),
),
Expanded(
flex: 3,
child: FullFooter(showIconsForSmall: false),
),
],
),
);
}