Repository navigation
Conversation
1. Copied analysis_options.yaml from `flutter create` (Flutter 3.47.7).
(Adds analyzer excludes and updates lint doc link)
2. Updated pubspec.yaml to
- Raise SDK constraint to ^3.13.0 to match material_ui.
- Remove unused cupertino_icons.
3. flutter pub upgrade --major-versions
- raises flutter_lints from ^2.0.3 to ^6.0.0
- archive 3.3.2 is no longer a dependency,
which resolves GHSA-9v85-q87q-g4vg and GHSA-r285-q736-9v95
Identified with `flutter analyze` and updated with `dart fix --apply --code=use_super_parameters`
Generated with `dart format` (Dart 3.13.5)
Generated by `flutter build ios --simulator --debug` on Flutter 3.47.7 No hand edits. Tool output: ``` Resolving dependencies... Downloading packages... material_color_utilities 0.13.0 (0.13.1 available) test_api 0.7.12 (0.7.15 available) Got dependencies! 2 packages have newer versions incompatible with dependency constraints. Try `flutter pub outdated` for more information. Building com.example.tabsOverlay for simulator (ios)... Updating minimum iOS deployment target to 15.0. Upgrading project.pbxproj Upgrading AppFrameworkInfo.plist Updating project for Xcode compatibility. Upgrading project.pbxproj Upgrading Runner.xcscheme Upgrading Info.plist Removing script build phase dependency analysis. Adding input path to Thin Binary build phase. ios/Runner/AppDelegate.swift uses the deprecated @UIApplicationMain attribute, updating. Adding Swift Package Manager integration... 4.4s Upgrading Runner.xcscheme To ensure your app continues to launch on upcoming iOS versions, UIScene lifecycle support will soon be required. Please see https://flutter.dev/to/uiscene-migration for the migration guide. Running Xcode build... Xcode build done. 20.2s ✓ Built build/ios/iphonesimulator/Runner.app ```
The old project (Gradle 6.7, AGP 4.1.0, `apply from: flutter.gradle`) no
longer builds with current Flutter.
Steps, run from the tabs_overlay directory:
1. rm -rf android
2. flutter create --platforms=android --org com.example \
--project-name tabs_overlay .
3. git restore pubspec.lock .metadata # unrelated from flutter create
4. rm test/widget_test.dart # template sample test
# Restore the app's native code and theme
5. git restore android/app/src/main/kotlin \
android/app/src/main/res/layout \
android/app/src/main/res/values
# Drop the template's night theme (see below)
6. rm -r android/app/src/main/res/values-night
Why remove values-night: The template's values-night/styles.xml
redefines LaunchTheme and NormalTheme on Theme.Black.NoTitleBar, which
isn't an AppCompat theme. MainActivity is an AppCompatActivity, so in
dark mode the app would crash ("You need to use a Theme.AppCompat theme
(or descendant) with this activity"). The app's own values/styles.xml
already handles dark mode through Theme.MaterialComponents.DayNight.
No hand edits.
Doesn't build on its own. The template has no AndroidX dependencies.
The next commit will add those.
Hand edits to make the native side build:
- android/app/build.gradle.kts: add in dependencies old project
declared.
- material (keep at 1.4.0 rather than risk changing native tab
appearance)
- lifecycle moves explicitly to 2.7.0 to match flutter embedding
- explicit kotlin-stdlib-jdk7 isn't needed. It's included by the
Kotlin Gradle plugin.
- PageViewModel.kt: Transformations.map has moved from a static call to
an extension function on LiveData.
After this commit the app builds/runs.
With targetSdk 36 (Flutter 3.47's default), Android 15+ draws the app edge to edge, under the status bar. Flutter's AppBar insets itself for the status bar, but the native AppBarLayout didn't, so it sat a status bar's height higher. The opaque native page covered Flutter's tab bar, and touches on the native tabs missed Flutter's tabs underneath.
Generated with `flutter pub add material_ui` (Flutter 3.47.7), which picked ^1.7.0. No hand edits. The lock also gains material_ui's dependencies it didn't have already (cupertino_ui, flutter_localizations, intl), and its Flutter floor rises to >=3.47.0 because material_ui requires Flutter 3.47. Nothing imports material_ui yet. That happens in a subsequent commit.
Generated with `dart fix --apply --code=migrate_design_widgets` (Dart 3.13.5). No hand edits.
4 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT
Migrates tabs_overlay from
package:flutter/material.darttopackage:material_ui/material_ui.dart, where the Material widgets are developed now, so the app compares the platform's tab view with theTabBarViewthe team works on.Commits, both unmodified tool output:
flutter pub add material_ui, which addsmaterial_ui: ^1.7.0. material_ui requires Flutter 3.47.dart fix --apply --code=migrate_design_widgetsswitcheslib/main.dart, the only file that importedmaterial.dart.Appearance on an iPhone 17 Pro simulator (iOS 26.4) and a Pixel 8 emulator (Android 17) is the same before and after the change. Each pair of recordings below replays the same scripted gestures before and after.
iOS, swiping to tab 2 and back:
ios_before.mp4
ios_after.mp4
Android, tapping the native TAB 2 and swiping back:
android_before.mp4
android_after.mp4
Tested with Flutter 3.47.7:
flutter analyze,flutter testanddart formatare clean, nopackage:flutter/material.dartimport is left, and the integration test passes on both devices.Part of flutter/flutter#172942
Pre-launch Checklist
I signed the CLA.I updated/added relevant documentation (doc comments with///).The existing widget and integration smoke tests cover the change: both run the app, which now builds its tabs from material_ui.
No CI runs tests here. Locally,
flutter testpasses, and the integration test passes on iOS and Android.If you need help, consider asking for advice on the #hackers-new channel on Discord.