layout changes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
parent
69f27b2e69
commit
6d09b2549e
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:repertory/constants.dart' as constants;
|
||||
import 'package:repertory/widgets/mount_list_widget.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
@ -18,7 +19,10 @@ class _HomeScreeState extends State<HomeScreen> {
|
||||
leading: const Icon(Icons.storage),
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: MountListWidget(),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(constants.padding),
|
||||
child: MountListWidget(),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () => Navigator.pushNamed(context, '/add'),
|
||||
tooltip: 'Add Mount',
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:repertory/constants.dart' as constants;
|
||||
import 'package:repertory/models/mount.dart';
|
||||
import 'package:repertory/models/mount_list.dart';
|
||||
import 'package:repertory/widgets/mount_widget.dart';
|
||||
@ -15,7 +16,15 @@ class MountListWidget extends StatelessWidget {
|
||||
itemBuilder: (context, idx) {
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => Mount(mountList.items[idx]),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom:
|
||||
idx == mountList.items.length - 1
|
||||
? 0.0
|
||||
: constants.padding,
|
||||
),
|
||||
child: const MountWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: mountList.items.length,
|
||||
|
@ -19,6 +19,7 @@ class _MountWidgetState extends State<MountWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: const EdgeInsets.all(0.0),
|
||||
child: Consumer<Mount>(
|
||||
builder: (context, mount, _) {
|
||||
final textColor = Theme.of(context).colorScheme.onSurface;
|
||||
|
Loading…
x
Reference in New Issue
Block a user