Skip to content
Merged
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
57 changes: 24 additions & 33 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,31 @@ class ViewHeaderCustomization extends StatefulWidget {
_ViewHeaderCustomizationState();
}

List<String> _days = <String>['S', 'M', 'T', 'W', 'T', 'F', 'S'];
List<Icon> _icons = <Icon>[
Icon(
Icons.ac_unit,
color: Colors.black,
),
Icon(Icons.wb_sunny, color: Colors.amber),
Icon(
Icons.wb_incandescent,
color: Color(0xFF0ba0000),
),
Icon(Icons.wb_auto, color: Colors.orange),
Icon(Icons.wb_cloudy, color: Colors.grey),
Icon(Icons.wb_sunny, color: Colors.amber),
Icon(
Icons.wb_incandescent,
color: Color(0xFF0ba0000),
)
];

class _ViewHeaderCustomizationState extends State<ViewHeaderCustomization> {
double _width, _cellWidth;

@override
void initState() {
_width = 0.0;
_cellWidth = 0.0;
super.initState();
}
final List<String> _days = <String>['S', 'M', 'T', 'W', 'T', 'F', 'S'];
final List<Icon> _icons = <Icon>[
Icon(
Icons.ac_unit,
color: Colors.black,
),
Icon(Icons.wb_sunny, color: Colors.amber),
Icon(
Icons.wb_incandescent,
color: Color(0xFF0ba0000),
),
Icon(Icons.wb_auto, color: Colors.orange),
Icon(Icons.wb_cloudy, color: Colors.grey),
Icon(Icons.wb_sunny, color: Colors.amber),
Icon(
Icons.wb_incandescent,
color: Color(0xFF0ba0000),
)
];

@override
Widget build(BuildContext context) {
_width = MediaQuery.of(context).size.width;
_cellWidth = _width / 9;
final double width = MediaQuery.of(context).size.width;
final double cellWidth = width / 9;

return Scaffold(
body: SafeArea(
Expand All @@ -68,8 +59,8 @@ class _ViewHeaderCustomizationState extends State<ViewHeaderCustomization> {
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext ctxt, int index) {
return Container(
padding: const EdgeInsets.only(left: 15,top: 5),
width: _cellWidth,
padding: const EdgeInsets.only(left: 15, top: 5),
width: cellWidth,
height: 5,
color: Colors.lightGreen,
child: Text(_days[index]),
Expand All @@ -82,7 +73,7 @@ class _ViewHeaderCustomizationState extends State<ViewHeaderCustomization> {
itemBuilder: (BuildContext ctxt, int index) {
return Container(
padding: const EdgeInsets.only(left: 5),
width: _cellWidth,
width: cellWidth,
child: _icons[index],
);
}),
Expand Down
53 changes: 23 additions & 30 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,56 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -73,35 +73,28 @@ packages:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
version: "0.17.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.2"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -113,69 +106,69 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
syncfusion_flutter_core:
dependency: transitive
description:
name: syncfusion_flutter_core
url: "https://pub.dartlang.org"
source: hosted
version: "18.3.47"
version: "19.1.55"
syncfusion_flutter_datepicker:
dependency: "direct main"
description:
name: syncfusion_flutter_datepicker
url: "https://pub.dartlang.org"
source: hosted
version: "18.3.47-beta"
version: "19.1.55-beta"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
sdks:
dart: ">=2.10.0-110 <=2.11.0-213.1.beta"
dart: ">=2.12.0 <3.0.0"
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: '>=2.12.0 <3.0.0'

dependencies:
flutter:
sdk: flutter
syncfusion_flutter_datepicker: 18.3.47-beta
syncfusion_flutter_datepicker: ^19.1.55-beta


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.0
cupertino_icons: ^1.0.2

dev_dependencies:
flutter_test:
Expand Down