thingsboard / flutter_thingsboard_app

ThingsBoard Mobile Application
https://thingsboard.io/products/mobile/
BSD 3-Clause "New" or "Revised" License
227 stars 167 forks source link

Which version of flutter to use to build? #100

Closed Tpro4391 closed 3 months ago

Tpro4391 commented 4 months ago

I have tried different versions of flutter to build the application but still getting a lot of errors:

  1. ecause every version of flutter_localizations from sdk depends on intl 0.19.0 and thingsboard_app depends on intl ^0.18.1, flutter_localizations from sdk is forbidden. So, because thingsboard_app depends on flutter_localizations from sdk, version solving failed. => update intl: ^0.19.0, form_builder_validators: ^11.0.0
  2. Run: flutter build appbundle --no-tree-shake-icons You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply lib/core/auth/login/two_factor_authentication_page.dart:357:35: Error: The argument type 'String' can't be assigned to the parameter type 'RegExp'.
    • 'RegExp' is from 'dart:core'. FormBuilderValidators.match(pattern, ^ /C:/Users/HoTien/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.5/lib/html_parser.dart:153:62: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
    • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/D:/ENV/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 'bodyText2'. style: Style.fromTextStyle(Theme.of(context).textTheme.bodyText2!), ^^^^^^^^^ /C:/Users/HoTien/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-3.0.0-alpha.5/lib/html_parser.dart:217:72: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
    • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/D:/ENV/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 'bodyText2'. style: Style.fromTextStyle(Theme.of(context).textTheme.bodyText2!), ....

How to build applications?

ybeshkarov commented 4 months ago

Hi @Tpro4391,

Use Flutter 3.19.6 and don't change any dependencies version in the pubspec.yaml.

iAnish commented 3 months ago

Hi @Tpro4391,

Use Flutter 3.19.6 and don't change any dependencies version in the pubspec.yaml.

This worked for me. Thanks