Unverified Commit 9a838455 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Fix `showDateRangePicker` is missing `dartpad` tag and cleanup (#144475)

fixes [`showDateRangePicker` interactive sample not loading](https://github.com/flutter/flutter/issues/144474)

### Description 

This fixes `showDateRangePicker` example not loading in Dartpad.

Similar fix was made for `showDatePicker` in https://github.com/flutter/flutter/pull/99401
parent ba719bc5
......@@ -13,10 +13,9 @@ class DatePickerApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(useMaterial3: true),
return const MaterialApp(
restorationScopeId: 'app',
home: const DatePickerExample(restorationId: 'main'),
home: DatePickerExample(restorationId: 'main'),
);
}
}
......
......@@ -13,10 +13,9 @@ class DatePickerApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(useMaterial3: true),
return const MaterialApp(
restorationScopeId: 'app',
home: const DatePickerExample(restorationId: 'main'),
home: DatePickerExample(restorationId: 'main'),
);
}
}
......
......@@ -1020,7 +1020,7 @@ class _DatePickerHeader extends StatelessWidget {
///
/// {@macro flutter.widgets.RestorationManager}
///
/// {@tool sample}
/// {@tool dartpad}
/// This sample demonstrates how to create a restorable Material date range picker.
/// This is accomplished by enabling state restoration by specifying
/// [MaterialApp.restorationScopeId] and using [Navigator.restorablePush] to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment