Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/EnsembleUI/ensemble/issues/1678 moving to flutter … #1679

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ pubspec_overrides.yaml
/starter/ios/Flutter
starter/ios/Runner.xcodeproj/project.pbxproj
/node_modules

# FVM Version Cache
.fvm/
2 changes: 1 addition & 1 deletion modules/auth/lib/signin/widget/sign_in_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:ensemble/util/utils.dart';
import 'package:ensemble/widget/helpers/controllers.dart';
import 'package:ensemble_auth/signin/widget/sign_in_with_apple.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' show Colors;
import 'package:flutter_svg/svg.dart';
import 'package:sign_in_with_apple/sign_in_with_apple.dart';

Expand Down
14 changes: 7 additions & 7 deletions modules/auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ description: A new Flutter module project.
version: 1.0.0+1

environment:
sdk: ">=3.0.6 <4.0.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand All @@ -28,20 +28,20 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble

ensemble_ts_interpreter:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: main
ref: 1678_flutter_3.24
path: modules/ensemble_ts_interpreter

get_it: ^7.6.0
get_it: ^8.0.0
google_sign_in: ^6.1.4
sign_in_with_apple: ^5.0.0
firebase_auth: 4.19.6
firebase_core: 2.31.1
firebase_auth: ^5.3.1
firebase_core: ^3.6.0
flutter_web_auth_2: ^2.1.4
flutter_svg: ^2.0.7
crypto: ^3.0.3
Expand Down
6 changes: 3 additions & 3 deletions modules/bracket/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ version: 0.0.1
publish_to: none

environment:
sdk: ">=3.2.1 <4.0.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
sdk: flutter
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble

dev_dependencies:
Expand Down
8 changes: 4 additions & 4 deletions modules/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: 0.0.1
homepage: https://github.com/EnsembleUI/ensemble_camera

environment:
sdk: ">=2.17.0 <=3.10.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand All @@ -15,12 +15,12 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble
ensemble_ts_interpreter:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: main
ref: 1678_flutter_3.24
path: modules/ensemble_ts_interpreter

collection: ^1.17.1
Expand Down
8 changes: 4 additions & 4 deletions modules/chat/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: A new Flutter package project.
version: 0.0.1

environment:
sdk: ">=3.0.5 <4.0.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
Expand All @@ -13,13 +13,13 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble

ensemble_ts_interpreter:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: main
ref: 1678_flutter_3.24
path: modules/ensemble_ts_interpreter

web_socket_client: 0.1.0
Expand Down
6 changes: 3 additions & 3 deletions modules/connect/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ version: 0.0.1
homepage: https://github.com/EnsembleUI/ensemble_connect

environment:
sdk: ">=3.0.6 <4.0.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
sdk: flutter
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble

plaid_flutter: ^3.1.2
Expand Down
6 changes: 3 additions & 3 deletions modules/contacts/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ version: 0.0.1
homepage: https://github.com/EnsembleUI/ensemble_contacts

environment:
sdk: ">=3.0.6 <4.0.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
sdk: flutter
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble

flutter_contacts: ^1.1.7+1
Expand Down
6 changes: 3 additions & 3 deletions modules/deeplink/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ version: 0.0.1
homepage: https://github.com/EnsembleUI/ensemble_deeplink

environment:
sdk: ">=3.2.1 <4.0.0"
flutter: ">=1.17.0"
sdk: ">=3.5.0"
flutter: ">=3.24.0"

dependencies:
flutter:
sdk: flutter
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.0.9
ref: 1678_flutter_3.24
path: modules/ensemble

flutter_branch_sdk: ^7.0.1
Expand Down
52 changes: 48 additions & 4 deletions modules/device_preview/lib/src/views/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ extension ThemeToolbarExtension on DevicePreviewToolBarThemeData {
primaryColor: accentColor,
primaryColorDark: accentColor,
indicatorColor: accentColor,
toggleableActiveColor: accentColor,
highlightColor: accentColor.withOpacity(0.1),
sliderTheme: base.sliderTheme.copyWith(
thumbColor: accentColor,
Expand All @@ -37,7 +36,30 @@ extension ThemeToolbarExtension on DevicePreviewToolBarThemeData {
activeTickMarkColor: accentColor,
inactiveTickMarkColor: accentColor,
overlayColor: accentColor.withOpacity(0.12),
),
), checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
), radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
), switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
),
);
case DevicePreviewToolBarThemeData.light:
final base = ThemeData.light();
Expand All @@ -51,7 +73,6 @@ extension ThemeToolbarExtension on DevicePreviewToolBarThemeData {
primaryColor: accentColor,
primaryColorDark: accentColor,
indicatorColor: accentColor,
toggleableActiveColor: accentColor,
highlightColor: accentColor,
appBarTheme: base.appBarTheme.copyWith(
color: barColor,
Expand All @@ -63,7 +84,30 @@ extension ThemeToolbarExtension on DevicePreviewToolBarThemeData {
activeTickMarkColor: accentColor,
inactiveTickMarkColor: accentColor,
overlayColor: accentColor.withOpacity(0.12),
),
), checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
), radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
), switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return accentColor; }
return null;
}),
),
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ToolPanelSection extends StatelessWidget {
),
child: Text(
title.toUpperCase(),
style: theme.textTheme.subtitle2?.copyWith(
style: theme.textTheme.titleSmall?.copyWith(
color: theme.hintColor,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SettingsSection extends StatelessWidget {
shape: BoxShape.circle,
color: background.scaffoldBackgroundColor,
border: Border.all(
color: toolbar.backgroundColor,
color: Theme.of(context).colorScheme.surface,
width: 1,
),
),
Expand Down Expand Up @@ -84,7 +84,7 @@ class SettingsSection extends StatelessWidget {
shape: BoxShape.circle,
color: toolbar.scaffoldBackgroundColor,
border: Border.all(
color: toolbar.backgroundColor,
color: Theme.of(context).colorScheme.surface,
width: 1,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class _TypeSectionHeader extends StatelessWidget {
}
}()
.toUpperCase(),
style: theme.textTheme.subtitle2?.copyWith(
style: theme.textTheme.titleSmall?.copyWith(
color: theme.hintColor,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class _ToolPanel extends StatelessWidget {
appBar: AppBar(
title: Text(
'Device preview',
style: theme.textTheme.headline6?.copyWith(
style: theme.textTheme.titleLarge?.copyWith(
fontSize: 14,
fontWeight: FontWeight.bold,
color: (theme.colorScheme.brightness == Brightness.dark
Expand Down
2 changes: 1 addition & 1 deletion modules/device_preview/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Approximate how your Flutter app looks and performs on another devi
homepage: https://github.com/aloisdeniel/flutter_device_preview

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.5.0'

dependencies:
flutter:
Expand Down
4 changes: 2 additions & 2 deletions modules/ensemble/integration_test/framework/test_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class TestHelper {
I18nProps i18nProps = I18nProps('integration_test/local/$appName/i18n');

EnsembleConfig config = EnsembleConfig(
definitionProvider: LocalDefinitionProvider(
definitionProvider: await LocalDefinitionProvider(
"integration_test/local/$appName/", "",
i18nProps: i18nProps, initialForcedLocale: forcedLocale));
i18nProps: i18nProps, initialForcedLocale: forcedLocale).init());
return config.updateAppBundle();
}

Expand Down
2 changes: 1 addition & 1 deletion modules/ensemble/lib/deep_link_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class DeepLinkManager extends DeepLinkNavigator {
/// the default screen. But we don't need to check for the initial load
void _checkInitialLink() async {
try {
Uri? initialUri = await _appLinks!.getInitialAppLink();
Uri? initialUri = await _appLinks!.getLatestLink();
if (initialUri != null) {
navigateToScreen(initialUri);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ensemble/lib/ensemble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class Ensemble extends WithEnsemble with EnsembleRouteObserver {
}
DefinitionProvider definitionProvider = DefinitionProvider.from(yamlMap);
_config = EnsembleConfig(
definitionProvider: definitionProvider,
definitionProvider: await definitionProvider.init(),
appBundle: await definitionProvider.getAppBundle(),
account: account,
services: Services.fromYaml(yamlMap['services']),
Expand Down
Loading
Loading