flutter/dev/tools
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
..
bin Change gradle lockfile generation script to use --config-only flag (#132967) 2023-08-21 19:51:55 +00:00
gen_defaults Add cancelButtonStyle & confirmButtonStyle to the DatePickerThemeData (#132847) 2023-08-30 21:16:13 +00:00
gen_keycodes Update flutter packages to pick up latest vm_service (#133335) 2023-08-25 11:03:35 -07:00
localization l10n-related documentation improvements (#133114) 2023-08-24 21:54:56 +00:00
test Use flutter pub get instead of dart pub get in create_api_docs.dart (#133493) 2023-08-28 16:12:16 -07:00
vitool Update flutter packages to pick up latest vm_service (#133335) 2023-08-25 11:03:35 -07:00
.gitignore [flutter_conductor] update dev/tools with release tool (#69791) 2020-11-06 11:14:04 -08:00
create_api_docs.dart Add doxygen doc generation. (#131356) 2023-08-29 11:12:02 -07:00
dartdoc_checker.dart Migrate dartdoc to null safety (#84153) 2021-06-07 17:09:03 -07:00
examples_smoke_test.dart Use flutter pub get instead of dart pub get in create_api_docs.dart (#133493) 2023-08-28 16:12:16 -07:00
find_engine_commit.dart begin migrating //flutter/dev/tools to null-safety (#80834) 2021-04-23 20:24:03 -07:00
mega_gallery.dart Enable dangling_library_doc_comments and library_annotations lints (#117365) 2022-12-20 16:03:21 -08:00
pubspec.yaml Update flutter packages to pick up latest vm_service (#133335) 2023-08-25 11:03:35 -07:00
repackage_gradle_wrapper.sh Point to a new artifacts location. (#70673) 2021-02-04 18:44:47 -08:00
update_icons.dart Improve handling of certain icons in RTL (#130979) 2023-07-21 19:07:39 +02:00