mirror of
https://github.com/gosticks/growme.git
synced 2025-10-16 11:45:38 +00:00
feat: improve layout
This commit is contained in:
parent
4c4c33b9dc
commit
5f03f26d4e
@ -1,3 +1,5 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:grow_me_app/colors.dart';
|
||||
@ -41,7 +43,7 @@ class DeviceCarouselState extends State<DeviceCarousel> {
|
||||
return Consumer<DeviceModel>(builder: (context, model, child) {
|
||||
return CarouselSlider(
|
||||
options: CarouselOptions(
|
||||
height: MediaQuery.of(context).size.height * 0.8,
|
||||
height: min(MediaQuery.of(context).size.height * 0.8, 550),
|
||||
initialPage: model.devices.isNotEmpty ? 1 : 0,
|
||||
autoPlay: false,
|
||||
scrollPhysics: const BouncingScrollPhysics(),
|
||||
|
||||
@ -120,7 +120,7 @@ class _MyHomePageState extends State<GrowMeHomePage> {
|
||||
backgroundColor: green,
|
||||
body: Column(
|
||||
children: [
|
||||
const SizedBox(height: 15),
|
||||
const Spacer(),
|
||||
DeviceCarousel(leadingCarouselItems: [_connectionCard()]),
|
||||
const Spacer(),
|
||||
].toList()),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user