Created
December 11, 2021 14:23
-
-
Save Jahidul007/f67a9bbbd04be0bb68ee1be5c0c78c77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return const MaterialApp( | |
title: 'Flutter Demo', | |
home: MyHomePage(), | |
); | |
} | |
} | |
class MyHomePage extends StatelessWidget { | |
const MyHomePage({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Container( | |
decoration: BoxDecoration( | |
// color: Colors.green.shade100, | |
borderRadius: BorderRadius.all(Radius.circular(30.0)), | |
), | |
width: double.infinity, | |
child: Column( | |
children: [ | |
Text( | |
'Coming up', | |
), | |
DayView( | |
date: DateTime.now().day, | |
), | |
DayView( | |
date: | |
DateTime.now().add(new Duration(days: 1)).day, | |
), | |
DayView( | |
date: | |
DateTime.now().add(new Duration(days: 2)).day, | |
), | |
], | |
), | |
), | |
); | |
} | |
} | |
class DayView extends StatefulWidget { | |
int? date; | |
DayView({this.date}); | |
@override | |
State<StatefulWidget> createState() { | |
// TODO: implement createState | |
return DayViewPage(date: this.date); | |
throw UnimplementedError(); | |
} | |
} | |
class DayViewPage extends State<DayView> { | |
int? date; | |
DayViewPage({this.date}); | |
@override | |
Widget build(BuildContext context) { | |
return Row( | |
children: [ | |
Container( | |
width: 30, | |
child: Padding( | |
padding: const EdgeInsets.all(5), | |
child: Text( | |
date.toString(), | |
), | |
), | |
), | |
], | |
); | |
throw UnimplementedError(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment