flutter/dev/tools/gen_defaults/lib
Taha Tesser 1e770c3808
Add cancelButtonStyle & confirmButtonStyle to the DatePickerThemeData (#132847)
fixes [Unable to adjust the color for "Cancel" and "Ok" button in datePicker dialog](https://github.com/flutter/flutter/issues/127739)

### Code sample

<details> 
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        useMaterial3: true,
        datePickerTheme: DatePickerThemeData(
          cancelButtonStyle: TextButton.styleFrom(
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(16)),
              side: BorderSide(color: Colors.red),
            ),
            backgroundColor: Colors.white,
            foregroundColor: Colors.red,
            elevation: 3,
            shadowColor: Colors.red,
          ),
          confirmButtonStyle: TextButton.styleFrom(
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(16)),
            ),
            backgroundColor: Colors.green[700],
            foregroundColor: Colors.white,
            elevation: 3,
            shadowColor: Colors.green[700],
          ),
        ),
      ),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: DatePickerDialog(
          initialDate: DateTime.now(),
          firstDate: DateTime(2020),
          lastDate: DateTime(2030),
        ),
      ),
    );
  }
}
``` 

</details>

### Before 

Not possible to customize action buttons from the `DatePickerThemeData`.

### After 

![Screenshot 2023-08-18 at 16 42 00](https://github.com/flutter/flutter/assets/48603081/4ec01e93-c661-491d-9253-d687da8b76f3)
2023-08-30 21:16:13 +00:00
..
action_chip_template.dart Replaces textScaleFactor with TextScaler (#128522) 2023-07-17 17:56:07 +00:00
app_bar_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
badge_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
banner_template.dart Cleanup M3 token templates for theme lookups (#122601) 2023-03-14 17:01:13 +00:00
bottom_app_bar_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
bottom_sheet_template.dart Provide default constraints for M3 bottom sheets (#120065) 2023-04-27 09:28:11 +02:00
button_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
card_template.dart Cleanup M3 token templates for theme lookups (#122601) 2023-03-14 17:01:13 +00:00
checkbox_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
chip_template.dart [flutter roll] Revert "Fix Chip.shape's side is not used when provided in Material 3" (#133615) 2023-08-29 19:59:02 -07:00
color_scheme_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
date_picker_template.dart Add cancelButtonStyle & confirmButtonStyle to the DatePickerThemeData (#132847) 2023-08-30 21:16:13 +00:00
dialog_template.dart Add Dialog.fullscreen and example (#112261) 2022-09-29 09:12:05 -07:00
divider_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
drawer_template.dart Fix M3 Drawer default shape in RTL (#118185) 2023-01-12 14:22:53 +00:00
expansion_tile_template.dart Reland "Update ExpansionTile to support Material 3 & add an example" (#121212) 2023-02-24 06:30:33 -08:00
fab_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
filter_chip_template.dart Replaces textScaleFactor with TextScaler (#128522) 2023-07-17 17:56:07 +00:00
icon_button_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
input_chip_template.dart Replaces textScaleFactor with TextScaler (#128522) 2023-07-17 17:56:07 +00:00
input_decorator_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
list_tile_template.dart Update ListTile text defaults to use ColorScheme (#128581) 2023-06-12 14:52:06 +00:00
menu_template.dart Update default menu text styles for Material 3 (#131930) 2023-08-22 22:21:00 +00:00
motion_template.dart Add support for M3 motion (#129942) 2023-07-19 22:07:59 +02:00
navigation_bar_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
navigation_drawer_template.dart Fix NavigationDrawer selected item has wrong icon color (#129625) 2023-06-30 08:58:14 +00:00
navigation_rail_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
popup_menu_template.dart [Reland] #131609 (#132555) 2023-08-16 00:44:06 +00:00
progress_indicator_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
radio_template.dart Update Radio button to material 3 (#111774) 2022-09-20 14:09:20 -07:00
search_bar_template.dart Add textCapitalization property for SearchBar and SearchAnchor (#131459) 2023-08-08 23:24:19 +00:00
search_view_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
segmented_button_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
slider_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
snackbar_template.dart Cleanup M3 token templates for theme lookups (#122601) 2023-03-14 17:01:13 +00:00
surface_tint.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
switch_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
tabs_template.dart Fix Scrollable TabBar for Material 3 (#131409) 2023-08-02 00:48:06 +00:00
template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
text_field_template.dart TextField should support disabled input text style (#119216) 2023-03-17 10:09:49 -07:00
time_picker_template.dart Fix TimePicker token issue link (#131863) 2023-08-03 22:32:57 +00:00
token_logger.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00
typography_template.dart Improve defaults generation with logging, stats, and token validation (#128244) 2023-06-09 11:28:18 +00:00