اذهب إلى المحتوى

السؤال

نشر

Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
../../../AppData/Local/Pub/Cache/hosted/pub.dev/country_code_picker-2.0.2/lib/country_code_picker.dart:203:73: Error: The getter 'button' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'button'.
                        widget.textStyle ?? Theme.of(context).textTheme.button,overflow: widget.textOverflow,
                                                                        ^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/material_with_modal_page_route.dart:66:26: Error: The method 'getPreviousRouteTransition' isn't defined for the class 'ModalBottomSheetRoute<dynamic>'.
 - 'ModalBottomSheetRoute' is from 'package:flutter/src/material/bottom_sheet.dart' ('/C:/flutter/packages/flutter/lib/src/material/bottom_sheet.dart').
Try correcting the name to the name of an existing method, or defining a method named 'getPreviousRouteTransition'.
        return nextRoute.getPreviousRouteTransition(context, secondaryAnimation, defaultTransition);
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/material_bottom_sheet.dart:28:13: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
      .push(ModalBottomSheetRoute<T>(
            ^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/material_bottom_sheet.dart:50:10: Error: A value of type 'Object?' can't be returned from an async function with return type 'Future<T?>'.
 - 'Object' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
  return result;
         ^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/bar_bottom_sheet.dart:102:13: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
      .push(ModalBottomSheetRoute<T>(
            ^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/bar_bottom_sheet.dart:125:10: Error: A value of type 'Object?' can't be returned from an async function with return type 'Future<T?>'.
 - 'Object' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
  return result;
         ^
Failed to compile application.
 

Recommended Posts

  • 0
نشر

من خلال رسالة الخطأ فهي تشير إلى أنّ لديك أخطاء توافق في مكتبات Flutter فمثلا مكتبة country_code_picker تستخدم خاصية button المهملة، ومكتبة modal_bottom_sheet تحتوي على مشاكل متعددة لحل المشكلة أولا نقوم تحديث المكتبات في ملف pubspec.yaml:

dependencies:
  country_code_picker: ^3.0.0 
  modal_bottom_sheet: ^3.0.0   

ثم نفذ:

flutter pub get

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...