Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var defaultBackgroundColor = Colors.grey[300];
var appBarColor = Colors.grey[900];
var myAppBar = AppBar(
backgroundColor: appBarColor,
title: Text(' '),
title: const Text(' '),
centerTitle: false,
);
var drawerTextColor = TextStyle(
Expand All @@ -16,7 +16,7 @@ var myDrawer = Drawer(
elevation: 0,
child: Column(
children: [
DrawerHeader(
const DrawerHeader(
child: Icon(
Icons.favorite,
size: 64,
Expand All @@ -25,7 +25,7 @@ var myDrawer = Drawer(
Padding(
padding: tilePadding,
child: ListTile(
leading: Icon(Icons.home),
leading: const Icon(Icons.home),
title: Text(
'D A S H B O A R D',
style: drawerTextColor,
Expand All @@ -35,7 +35,7 @@ var myDrawer = Drawer(
Padding(
padding: tilePadding,
child: ListTile(
leading: Icon(Icons.settings),
leading: const Icon(Icons.settings),
title: Text(
'S E T T I N G S',
style: drawerTextColor,
Expand All @@ -45,7 +45,7 @@ var myDrawer = Drawer(
Padding(
padding: tilePadding,
child: ListTile(
leading: Icon(Icons.info),
leading: const Icon(Icons.info),
title: Text(
'A B O U T',
style: drawerTextColor,
Expand All @@ -55,7 +55,7 @@ var myDrawer = Drawer(
Padding(
padding: tilePadding,
child: ListTile(
leading: Icon(Icons.logout),
leading: const Icon(Icons.logout),
title: Text(
'L O G O U T',
style: drawerTextColor,
Expand Down
12 changes: 4 additions & 8 deletions lib/responsive/desktop_body.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import 'package:flutter/material.dart';
import 'package:responsivedashboard/util/my_tile.dart';
import '../constants.dart';
import '../util/my_box.dart';
import '../util/my_tile.dart';

class DesktopScaffold extends StatefulWidget {
class DesktopScaffold extends StatelessWidget {
const DesktopScaffold({Key? key}) : super(key: key);

@override
State<DesktopScaffold> createState() => _DesktopScaffoldState();
}

class _DesktopScaffoldState extends State<DesktopScaffold> {
@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -35,6 +29,7 @@ class _DesktopScaffoldState extends State<DesktopScaffold> {
child: SizedBox(
width: double.infinity,
child: GridView.builder(
controller: ScrollController(),
itemCount: 4,
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
Expand All @@ -49,6 +44,7 @@ class _DesktopScaffoldState extends State<DesktopScaffold> {
// list of previous days
Expanded(
child: ListView.builder(
controller: ScrollController(),
itemCount: 7,
itemBuilder: (context, index) {
return const MyTile();
Expand Down
2 changes: 2 additions & 0 deletions lib/responsive/mobile_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class _MobileScaffoldState extends State<MobileScaffold> {
child: SizedBox(
width: double.infinity,
child: GridView.builder(
controller: ScrollController(),
itemCount: 4,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2),
Expand All @@ -40,6 +41,7 @@ class _MobileScaffoldState extends State<MobileScaffold> {
// list of previous days
Expanded(
child: ListView.builder(
controller: ScrollController(),
itemCount: 4,
itemBuilder: (context, index) {
return const MyTile();
Expand Down
2 changes: 2 additions & 0 deletions lib/responsive/tablet_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class _TabletScaffoldState extends State<TabletScaffold> {
child: SizedBox(
width: double.infinity,
child: GridView.builder(
controller: ScrollController(),
itemCount: 4,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4),
Expand All @@ -40,6 +41,7 @@ class _TabletScaffoldState extends State<TabletScaffold> {
// list of previous days
Expanded(
child: ListView.builder(
controller: ScrollController(),
itemCount: 6,
itemBuilder: (context, index) {
return const MyTile();
Expand Down