AddisMap / AddisMapTransit

Public transport trip planner for Ethiopia
https://addismaptransit.com/
GNU General Public License v3.0
3 stars 1 forks source link

Upgrade to Trufi-Core 4.0 & Set target to API Level 34 (Android 14) #7

Open amenk opened 2 months ago

amenk commented 2 months ago

Google Play requires us to use API Level 34 for further updates until 31 Aug 2024

amenk commented 2 months ago

Trufi Core uses flutter 3.3.3 which still targets 31, so we still have to overwrite the targetLevel in our android/app/build.gradle as before, even after upgrading to trufi-core 4.0

amenk commented 2 months ago

The example seems currently to be broken - there is a TODO

https://github.com/trufi-association/trufi-core/blob/2caf6fb95fcff99bc89109fda4876b0ca5bc03d5/example/lib/main.dart#L11

We can try to check https://github.com/trufi-association/trufi-app/pull/10 for the necessary upgrade steps.

amenk commented 2 months ago

Build is failing with a red screen of death:

======== Exception caught by widgets library =======================================================
The following _CastError was thrown building ItineraryCard(dirty, dependencies: [_InheritedTheme, _LocalizationsScope-[GlobalKey#9d62d]]):
Null check operator used on a null value

The relevant error-causing widget was: 
  TrufiApp TrufiApp:projects/AddisMapTransit/lib/main.dart:25:5
When the exception was thrown, this was the stack: 
#0      TrufiBaseLocalization.of (package:trufi_core/base/translations/trufi_base_localizations.dart:72:83)
#1      ItineraryCard.build (package:trufi_core/base/pages/home/widgets/plan_itinerary_tabs/itinarary_card/itinerary_card.dart:22:48)
#2      StatelessElement.build (package:flutter/src/widgets/framework.dart:4949:49)
#3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4878:15)
#4      Element.rebuild (package:flutter/src/widgets/framework.dart:4604:5)
#5      StatelessElement.update (package:flutter/src/widgets/framework.dart:4956:5)
#6      Element.updateChild (package:flutter/src/widgets/framework.dart:3570:15)
#7      SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6307:14)