maxim-saplin / data_table_2

In-place substitute for Flutter's DataTable and PaginatedDataTable with fixed/sticky header and extra features
https://pub.dev/packages/data_table_2
BSD 3-Clause "New" or "Revised" License
202 stars 135 forks source link

After flutter pub upgrade data_table_2 showing error #284

Closed RanenduKarmakar1997 closed 2 months ago

RanenduKarmakar1997 commented 2 months ago

I am using data_table_2-2.5.15. After running the flutter pub upgrade command and then executing the main.dart file for Flutter web, I encounter the following issue and it's not allow me to run the project.

Target dart2js failed: ProcessException: Process exited abnormally with exit code 1: ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:90:5: Error: Type 'WidgetStateProperty' not found. WidgetStateProperty<Color?>? color, ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:362:16: Error: Type 'WidgetStateProperty' not found. required WidgetStateProperty<Color?>? overlayColor, ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:419:16: Error: Type 'WidgetStateProperty' not found. required WidgetStateProperty<Color?>? overlayColor}) { ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:491:16: Error: Type 'WidgetStateProperty' not found. required WidgetStateProperty<Color?>? overlayColor}) { ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:1161:7: Error: Type 'WidgetStateProperty' not found. WidgetStateProperty<Color?>? effectiveDataRowColor) { ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:1329:7: Error: Type 'WidgetStateProperty' not found. WidgetStateProperty<Color?>? effectiveDataRowColor, ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:1333:7: Error: Type 'WidgetStateProperty' not found. WidgetStateProperty<Color?> defaultRowColor, ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:1399:7: Error: Type 'WidgetStateProperty' not found. WidgetStateProperty<Color?>? effectiveHeadingRowColor, int numberOfCols) { ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/paginated_data_table_2.dart:350:9: Error: Type 'WidgetStateProperty' not found. final WidgetStateProperty<Color?>? headingRowColor; ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/get-4.6.5/lib/get_navigation/src/nav2/get_information_parser.dart:29:50: Warning: Operand of null-aware operation '??' has type 'String' which excludes null. final matchResult = Get.routeTree.matchRoute(location ?? initialRoute); ^ ../../../.pub-cache/hosted/pub.dev/get-4.6.5/lib/get_navigation/src/nav2/get_router_delegate.dart:374:36: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. await backUntil(config.location!, popMode: PopMode.Page); ^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:90:5: Error: 'WidgetStateProperty' isn't a type. WidgetStateProperty<Color?>? color, ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:362:16: Error: 'WidgetStateProperty' isn't a type. required WidgetStateProperty<Color?>? overlayColor, ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:419:16: Error: 'WidgetStateProperty' isn't a type. required WidgetStateProperty<Color?>? overlayColor}) { ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:491:16: Error: 'WidgetStateProperty' isn't a type. required WidgetStateProperty<Color?>? overlayColor}) { ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:590:12: Error: 'WidgetState' isn't a type. (Set states) { ^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:589:29: Error: The getter 'WidgetStateProperty' isn't defined for the class 'DataTable2'.

RanenduKarmakar1997 commented 2 months ago

Screenshot from 2024-06-13 14-11-57

maxim-saplin commented 2 months ago

What is your flutter version? Try upgrading flutter (flutter upgrade)

RanenduKarmakar1997 commented 2 months ago

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.5, on Ubuntu 22.04.4 LTS 6.5.0-35-generic, locale en_IN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2023.3) [✓] IntelliJ IDEA Community Edition (version 2024.1) [✓] VS Code (version 1.90.0) [✓] Connected device (2 available) [✓] Network resources

• No issues found!

maxim-saplin commented 2 months ago

You jave older versions of Flutter

RanenduKarmakar1997 commented 2 months ago

@maxim-saplin I upgraded my Flutter version, but I'm still encountering the same issue.

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.2, on Ubuntu 22.04.4 LTS 6.5.0-35-generic, locale en_IN) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2023.3) [✓] IntelliJ IDEA Community Edition (version 2024.1) [✓] VS Code (version 1.90.0) [✓] Connected device (2 available) [✓] Network resources

• No issues found!

Ensonberg commented 2 months ago

Target dart2js failed: ProcessException: Process exited abnormally: ../../.pub-cache/hosted/pub.dev/google_fonts-6.2.0/lib/src/google_fonts_base.dart:69:8: Error: Type 'FontFeature' not found. List? fontFeatures, ^^^^^^^^^^^ ../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:90:5: Error: Type 'WidgetStateProperty' not found. WidgetStateProperty<Color?>? color, ^^^^^^^^^^^^^^^^^^^ ../../.pub-cache/hosted/pub.dev/data_table_2-2.5.15/lib/src/data_table_2.dart:362:16:

maxim-saplin commented 2 months ago

Try upgrading flutter via flutter upgrade or try locking the version of the widget to the older one, e.g.

dependencies:
  data_table_2: 2.5.12
theREMASTERED1 commented 2 months ago

Im having this exact issue atm @maxim-saplin this happened after I upgraded my kotlin from 1.7.10 to 1.8.10 and gradle tools from 7.3.0 to 7.4.2 my flutter is 3.19.6

maxim-saplin commented 2 months ago

Im having this exact issue atm @maxim-saplin this happened after I upgraded my kotlin from 1.7.10 to 1.8.10 and gradle tools from 7.3.0 to 7.4.2 my flutter is 3.19.6

Try upgrading flutter via flutter upgrade or try locking the version of the widget to the older one, e.g.

dependencies:
  data_table_2: 2.5.12
theREMASTERED1 commented 2 months ago

downgrading all the way to 2.3.0 worked for me