升级到Flutter 1.2后无法构建

时间:2020-08-08 18:54:29

标签: flutter dart

../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:28: Error: Type 'DiagnosticableMixin' not found.
class DatePickerTheme with DiagnosticableMixin {                        
                           ^^^^^^^^^^^^^^^^^^^                          
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class DatePickerTheme with DiagnosticableMixin {                        
      ^                                                                 
                                                                        
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* Where:                                                                
Script '/home/tfradebe/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 896
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildDebug'.              
> Process 'command '/home/tfradebe/flutter/bin/flutter'' finished with non-zero exit value 1
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 28s                                                     
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        29.1s
Exception: Gradle task assembleDebug failed with exit code 1

1 个答案:

答案 0 :(得分:2)

正在解决此问题的修复程序正在影响许多插件。同时,您可以像这样包含对flutter_datetime_picker的引用

flutter_datetime_picker:
  git:
    url: https://github.com/ditheshthegreat/flutter_datetime_picker # Repo
    ref: patch-1 # Branch name

This是与github相关的票证