-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: date/time pickerDate or time picker widgetsDate or time picker widgetsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
showDateRangePicker sample below contains a button to launch the date range picker and the DatePickerThemeData where color is provided to rangePickerHeaderBackgroundColor theme property.
Expected results
The date range picker header background should use the provided theme color
Actual results
The date range picker header background doesn't use the provided theme color.
Code sample
Code sample
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(
theme: ThemeData(
useMaterial3: true,
datePickerTheme: const DatePickerThemeData(
rangePickerHeaderBackgroundColor: Colors.amber,
),
),
home: Scaffold(
body: Builder(builder: (BuildContext context) {
return Center(
child: ElevatedButton(
onPressed: () async {
await showDateRangePicker(
context: context,
initialDateRange: DateTimeRange(
start: DateTime(2021, DateTime.january, 15),
end: DateTime(2021, DateTime.january, 20),
),
// initialDate: DateTime(2016, DateTime.january, 15),
firstDate: DateTime(2001),
lastDate: DateTime(2031, DateTime.december, 31),
);
},
child: const Text('Show Date Range Picker'),
),
);
}),
),
);
}
}
Screenshots or Video
No response
Logs
~
Flutter Doctor output
Doctor output
[!] Flutter (Channel master, 3.11.0-6.0.pre.134, on macOS 13.3.1 22E772610a
darwin-arm64, locale en-EE)
• Flutter version 3.11.0-6.0.pre.134 on channel master at
/Users/tahatesser/Code/flutter
! Upstream repository [email protected]:TahaTesser/flutter.git is not the same
as FLUTTER_GIT_URL
• FLUTTER_GIT_URL = [email protected]:NevercodeHQ/flutter.git
• Framework revision f31dae2a80 (35 hours ago), 2023-05-17 17:18:51 -0700
• Engine revision d970370779
• Dart version 3.1.0 (build 3.1.0-118.0.dev)
• DevTools version 2.23.1
• If those were intentional, you can disregard the above warnings; however
it is recommended to use "git" directly to perform update checks and
upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/tahatesser/Code/android-sdk
• Platform android-33, build-tools 33.0.2
• ANDROID_SDK_ROOT = /Users/tahatesser/Code/android-sdk
• Java binary at: /Applications/Android Studio
Preview.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.12.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio
• Android Studio at /Applications/Android Studio Preview.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.78.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.64.0
[✓] VS Code (version 1.79.0-insider)
• VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
• Flutter extension version 3.64.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E772610a
darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
rydmike
Metadata
Metadata
Assignees
Labels
f: date/time pickerDate or time picker widgetsDate or time picker widgetsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Type
Projects
Status
Done (PR merged)

