Using responsive grid library
This commit is contained in:
parent
bdf69276ad
commit
16ae1d3ea2
|
|
@ -0,0 +1,7 @@
|
||||||
|
library;
|
||||||
|
|
||||||
|
import "package:nt4/nt4.dart";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NT4Client? ntClient;
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:helm/widgets/base_card.dart';
|
import 'package:helm/widgets/base_card.dart';
|
||||||
|
import 'package:responsive_grid/responsive_grid.dart';
|
||||||
import '../widgets/text_card.dart';
|
import '../widgets/text_card.dart';
|
||||||
|
|
||||||
class Dashboard extends StatelessWidget {
|
class Dashboard extends StatelessWidget {
|
||||||
|
|
@ -23,22 +24,46 @@ class Dashboard extends StatelessWidget {
|
||||||
// the App.build method, and use it to set our appbar title.
|
// the App.build method, and use it to set our appbar title.
|
||||||
title: Text("Helm"),
|
title: Text("Helm"),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: ResponsiveGridRow(
|
||||||
children: <Widget>[
|
children: [
|
||||||
Row(
|
ResponsiveGridCol(
|
||||||
children: [
|
md: 12,
|
||||||
BaseCard(cardTitle: "Reef Picker", height: 4, width: 6),
|
child: ResponsiveGridRow(
|
||||||
Column(
|
children: [
|
||||||
children: [
|
ResponsiveGridCol(
|
||||||
TextCard(cardTitle: 'Match State', height: 2, width: 3),
|
md: 6,
|
||||||
TextCard(cardTitle: "Match Time", height: 2, width: 3),
|
child: BaseCard(cardTitle: "Reef Picker", height: 4),
|
||||||
],
|
),
|
||||||
),
|
ResponsiveGridCol(
|
||||||
],
|
md: 6,
|
||||||
|
child: ResponsiveGridRow(
|
||||||
|
children: [
|
||||||
|
ResponsiveGridCol(
|
||||||
|
md: 6,
|
||||||
|
child: TextCard(cardTitle: "Match State"),
|
||||||
|
),
|
||||||
|
ResponsiveGridCol(
|
||||||
|
md: 6,
|
||||||
|
child: TextCard(cardTitle: "Match Time"),
|
||||||
|
),
|
||||||
|
ResponsiveGridCol(
|
||||||
|
md: 6,
|
||||||
|
child: TextCard(cardTitle: "Blah Blah"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ResponsiveGridCol(
|
||||||
|
md: 6,
|
||||||
|
child: ResponsiveGridRow(
|
||||||
|
children: [
|
||||||
|
ResponsiveGridCol(child: TextCard(cardTitle: "Blah")),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Row(children: [
|
|
||||||
TextCard(cardTitle: "Intake State", height: 2, width: 3,)
|
|
||||||
],)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,14 @@ class BaseCard extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
Size size = MediaQuery.sizeOf(context);
|
||||||
|
|
||||||
return Card(
|
return Card(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 100.0 * width,
|
width: (size.width / 12) * width ,
|
||||||
height: 100.0 * height,
|
height: (size.height / 12) * height,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|
|
||||||
24
pubspec.lock
24
pubspec.lock
|
|
@ -5,10 +5,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
|
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.12.0"
|
version: "2.13.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -61,10 +61,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
|
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.2"
|
version: "1.3.3"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -87,10 +87,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
|
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.8"
|
version: "10.0.9"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -171,6 +171,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
|
responsive_grid:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: responsive_grid
|
||||||
|
sha256: "852b4d46ae4a530e0d54a1dc59964f3d2cd8d6ca1f6fc4e5790cc0580e367e24"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.4"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -244,10 +252,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
|
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.3.1"
|
version: "15.0.0"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ dependencies:
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
nt4: ^1.3.3
|
nt4: ^1.3.3
|
||||||
|
responsive_grid: ^2.4.4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue