سلام
من بعداز اینکه پکیج رو اضافه میکنم خطای زیر رو میگیرم و نمیتونم از پکیج استفاده کنم
`
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/ptime_picker.dart:813:48: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
}) : super(repaint: PaintingBinding.instance.systemFonts);
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:668:30: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
PaintingBinding.instance.systemFonts.addListener(_handleSystemFontsChange);
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:681:30: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
PaintingBinding.instance.systemFonts
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:1226:30: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
PaintingBinding.instance.systemFonts.addListener(_handleSystemFontsChange);
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:1245:30: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
PaintingBinding.instance.systemFonts
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:1590:31: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/E:/flutter/packages/flutter/lib/src/scheduler/binding.dart').
Try calling using ?. instead.
SchedulerBinding.instance.addPostFrameCallback((Duration timestamp) {
^^^^^^^^^^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:1800:30: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
PaintingBinding.instance.systemFonts.addListener(_handleSystemFontsChange);
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:1816:30: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('/E:/flutter/packages/flutter/lib/src/painting/binding.dart').
Try accessing using ?. instead.
PaintingBinding.instance.systemFonts
^^^^^^^^^^^
/E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/cupertino/cupertino_date_picker.dart:2063:31: Error: Method 'addPostFrameCallback' cannot be called on 'SchedulerBinding?' because it is potentially null.
'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('/E:/flutter/packages/flutter/lib/src/scheduler/binding.dart').
Try calling using ?. instead.
SchedulerBinding.instance.addPostFrameCallback((Duration timestamp) {
^^^^^^^^^^^^^^^^^^^^
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'E:\flutter\bin\flutter.bat'' 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.
سلام من بعداز اینکه پکیج رو اضافه میکنم خطای زیر رو میگیرم و نمیتونم از پکیج استفاده کنم
` /E:/flutter/.pub-cache/hosted/pub.dartlang.org/persian_datetime_picker-2.5.0/lib/src/ptime_picker.dart:813:48: Error: Property 'systemFonts' cannot be accessed on 'PaintingBinding?' because it is potentially null.
FAILURE: Build failed with an exception.
Where: Script 'E:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
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 10s Exception: Gradle task assembleDebug failed with exit code 1 `