TheAlphamerc/filterlist

Error: Type 'ListTileThemeData' not found - When compiling on Macos

IdoBloch4 opened this issue · 1 comments

Describe the bug
Failed to compile this library on macos (m1) Monterey 12.0.1
Here are the errors I get when I use this library, but when I comment out the usage its working just fine.

Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:37:5: Error: Type 'ListTileThemeData' not found.
    ListTileThemeData? listTileTheme,
    ^^^^^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:84:9: Error: Type 'ListTileThemeData' not found.
  final ListTileThemeData listTileTheme;
        ^^^^^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/filter_list_delegate.dart:252:27: Error: No named parameter with the name 'data'.
                          data: theme.listTileTheme,
                          ^^^^
../../Downloads/flutter/packages/flutter/lib/src/material/list_tile.dart:44:9: Context: Found this candidate, but the arguments don't match.
  const ListTileTheme({
        ^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/filter_list_delegate.dart:260:27: Error: No named parameter with the name 'data'.
                          data: theme.listTileTheme,
                          ^^^^
../../Downloads/flutter/packages/flutter/lib/src/material/list_tile.dart:44:9: Context: Found this candidate, but the arguments don't match.
  const ListTileTheme({
        ^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:37:5: Error: 'ListTileThemeData' isn't a type.
    ListTileThemeData? listTileTheme,
    ^^^^^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:51:23: Error: Method not found: 'ListTileThemeData'.
    listTileTheme ??= ListTileThemeData();
                      ^^^^^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:84:9: Error: 'ListTileThemeData' isn't a type.
  final ListTileThemeData listTileTheme;
        ^^^^^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:97:33: Error: 'ListTileThemeData' isn't a type.
      ..add(DiagnosticsProperty<ListTileThemeData>(
                                ^^^^^^^^^^^^^^^^^
../../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/filter_list-1.0.1/lib/src/theme/filter_list_delegate_theme.dart:102:33: Error: 'ListTileThemeData' isn't a type.
      ..add(DiagnosticsProperty<ListTileThemeData>(
                                ^^^^^^^^^^^^^^^^^

To Reproduce
Steps to reproduce the behavior:

  1. Here is my only usage of it in my app
await FilterListDialog.display<RequestDBModel>(
      context,
      listData: distinctRequests,
      selectedListData: selectedRequests,
      choiceChipLabel: getFilteredFieldAsString,
      validateSelectedItem: (list, val) => list!.contains(val),
      onItemSearch: (request, query) {
        return getFilteredFieldAsString(request)
            .toLowerCase()
            .contains(query.toLowerCase());
      },
      selectedItemsText:
          AppDynamicLocalizations.of(context)?.translate("selecteditems") ??
              'selected items',
      allButtonText:
          AppDynamicLocalizations.of(context)?.translate("all") ?? 'All',
      applyButtonText:
          AppDynamicLocalizations.of(context)?.translate("apply") ?? 'Apply',
      resetButtonText:
          AppDynamicLocalizations.of(context)?.translate("reset") ?? 'Reset',
      onApplyButtonClick: (list) {
        setState(() {
          filtersByColumn[columnIndex] = [];
          if (list?.length != distinctRequests.length) {
            // If actually choose all(no need to filter it at all)
            list?.forEach((request) {
              filtersByColumn[columnIndex]
                  .add(getFilteredFieldAsString(request));
            });
          }
        });
        Navigator.pop(context);
      },
    );

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macos (m1) Monterey 12.0.1 (On windows it works great)
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: Compiled to web
  • Browser chrome

This issue was resolved for me after I upgrade to flutter 3.X.X