Added the MediumSIzedContainer widget
This commit is contained in:
@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
|
||||
import 'MediumSizedContainer.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MainApp());
|
||||
}
|
||||
@ -33,12 +35,18 @@ class MainApp extends StatelessWidget {
|
||||
backgroundColor: secondaryColor,
|
||||
foregroundColor: isDark ? Colors.white : Colors.black),
|
||||
backgroundColor: accentColor,
|
||||
body: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(isDark
|
||||
? 'assets/clock icon dark.png'
|
||||
: 'assets/clock icon light.png')))));
|
||||
body: LayoutBuilder(builder: (context, constraints) {
|
||||
if (constraints.maxWidth > 600) {
|
||||
return MediumSizedContainer();
|
||||
}
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(isDark
|
||||
? 'assets/clock icon dark.png'
|
||||
: 'assets/clock icon light.png'))));
|
||||
}));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user