Skip to content

Picker as widget #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
30 changes: 30 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,39 @@ class HomePage extends StatelessWidget {
'show custom time picker,\nyou can custom picker model like this',
style: TextStyle(color: Colors.blue),
)),
TextButton(
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => DatePickerWidgetScreen()));
},
child: Text(
'show date picker widget',
style: TextStyle(color: Colors.blue),
)),
],
),
),
);
}
}

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

@override
_DatePickerWidgetScreenState createState() => _DatePickerWidgetScreenState();
}

class _DatePickerWidgetScreenState extends State<DatePickerWidgetScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Date picker widget'),
),
body: Center(
child: DatePickerWidget(),
),
);
}
}
Loading