feat : add base home

This commit is contained in:
Yaël Perret
2024-11-08 18:23:29 +01:00
parent cd04c7c2c4
commit 2b143bd884
43 changed files with 95 additions and 111 deletions

View File

@@ -1,3 +1,4 @@
import 'package:bahla_front/ui/common/images.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import 'package:bahla_front/ui/common/app_colors.dart';
@@ -15,65 +16,41 @@ class HomeView extends StackedView<HomeViewModel> {
Widget? child,
) {
return Scaffold(
body: SafeArea(
child: Padding(
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 25.0),
child: Center(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
verticalSpaceLarge,
Column(
children: [
const Text(
'Hello, STACKED!',
style: TextStyle(
fontSize: 35,
fontWeight: FontWeight.w900,
),
),
verticalSpaceMedium,
MaterialButton(
color: Colors.black,
onPressed: viewModel.incrementCounter,
child: Text(
viewModel.counterLabel,
style: const TextStyle(color: Colors.white),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.center,
children: [
MaterialButton(
color: kcDarkGreyColor,
onPressed: viewModel.showDialog,
child: const Text(
'Show Dialog',
style: TextStyle(
color: Colors.white,
),
),
Column(
children: [
Image(
image: AssetImage(Images.ExempleAffiche),
height: 200,
),
],
),
MaterialButton(
color: kcDarkGreyColor,
onPressed: viewModel.showBottomSheet,
child: const Text(
'Show Bottom Sheet',
style: TextStyle(
color: Colors.white,
Column(
children: [
Container(
child: Text(
"Disc'Octonelle 2",
style: Theme.of(context).textTheme.titleLarge,
),
),
),
),
],
)
],
)
],
),
),
),
),
);
}