Skip to content

Commit 70c1958

Browse files
authored
chore: update project (#28)
* chore: upgrade localizations * chore: upgrade sdk * chore: fix localizations export * chore: add ios helpers * style: change models formatting * chore: bump packages * style: add typing * style: update formatting * style: remove multiple underscores * chore: upgrade gradle plugins * fix: increase jvm heap memory * style: fix formatting
1 parent 7d0d5da commit 70c1958

40 files changed

+529
-461
lines changed

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4g
22
android.useAndroidX=true
33
android.enableJetifier=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Apr 02 02:12:39 EEST 2024
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.1.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version "8.3.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
2323
id "com.google.gms.google-services" version "4.4.0" apply false
2424
}
2525

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
import lldb
6+
7+
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
8+
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
9+
base = frame.register["x0"].GetValueAsAddress()
10+
page_len = frame.register["x1"].GetValueAsUnsigned()
11+
12+
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
13+
# first page to see if handled it correctly. This makes diagnosing
14+
# misconfiguration (e.g. missing breakpoint) easier.
15+
data = bytearray(page_len)
16+
data[0:8] = b'IHELPED!'
17+
18+
error = lldb.SBError()
19+
frame.GetThread().GetProcess().WriteMemory(base, data, error)
20+
if not error.Success():
21+
print(f'Failed to write into {base}[+{page_len}]', error)
22+
return
23+
24+
def __lldb_init_module(debugger: lldb.SBDebugger, _):
25+
target = debugger.GetDummyTarget()
26+
# Caveat: must use BreakpointCreateByRegEx here and not
27+
# BreakpointCreateByName. For some reasons callback function does not
28+
# get carried over from dummy target for the later.
29+
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
30+
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
31+
bp.SetAutoContinue(True)
32+
print("-- LLDB integration loaded --")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Generated file, do not edit.
3+
#
4+
5+
command script import --relative-to-command-file flutter_lldb_helper.py

lib/app/cubit/app_cubit.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ part 'app_state.dart';
66
class AppCubit extends Cubit<AppState> {
77
AppCubit({
88
required UserRepository userRepository,
9-
}) : _userRepository = userRepository,
10-
super(
11-
userRepository.user.isEmpty
12-
? const AppState.unauthenticated()
13-
: AppState.newlyAuthenticated(userRepository.user),
14-
) {
9+
}) : _userRepository = userRepository,
10+
super(
11+
userRepository.user.isEmpty
12+
? const AppState.unauthenticated()
13+
: AppState.newlyAuthenticated(userRepository.user),
14+
) {
1515
_watchUser();
1616
}
1717

lib/app/cubit/app_state.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@ final class AppState extends Equatable {
2424
const AppState.unauthenticated() : this._(status: AppStatus.unauthenticated);
2525

2626
const AppState.newlyAuthenticated(User user)
27-
: this._(
28-
status: AppStatus.newlyAuthenticated,
29-
user: user,
30-
);
27+
: this._(
28+
status: AppStatus.newlyAuthenticated,
29+
user: user,
30+
);
3131

3232
const AppState.authenticated(User user)
33-
: this._(
34-
status: AppStatus.authenticated,
35-
user: user,
36-
);
33+
: this._(
34+
status: AppStatus.authenticated,
35+
user: user,
36+
);
3737

3838
const AppState.failure({
3939
required UserFailure failure,
4040
required User user,
4141
}) : this._(
42-
status: AppStatus.failure,
43-
user: user,
44-
failure: failure,
45-
);
42+
status: AppStatus.failure,
43+
user: user,
44+
failure: failure,
45+
);
4646

4747
final AppStatus status;
4848
final User user;

lib/app/view/app.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ class AppView extends StatelessWidget {
6060
listener: (context, state) {
6161
final l10n = context.l10n;
6262
return switch (state.failure) {
63-
AuthUserChangesFailure() =>
64-
context.showSnackBar(l10n.authFailureMessage),
65-
SignOutFailure() =>
66-
context.showSnackBar(l10n.signOutFailureMessage),
63+
AuthUserChangesFailure() => context.showSnackBar(
64+
l10n.authFailureMessage,
65+
),
66+
SignOutFailure() => context.showSnackBar(
67+
l10n.signOutFailureMessage,
68+
),
6769
_ => context.showSnackBar(l10n.unknownFailureMessage),
6870
};
6971
},

lib/home/view/bottom_nav_bar.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ extension NavBarItemExtensions on NavBarItem {
1111

1212
final class NavBarController extends PageController {
1313
NavBarController({NavBarItem initialItem = NavBarItem.topics})
14-
: _notifier = ValueNotifier<NavBarItem>(initialItem),
15-
super(initialPage: initialItem.index) {
14+
: _notifier = ValueNotifier<NavBarItem>(initialItem),
15+
super(initialPage: initialItem.index) {
1616
_notifier.addListener(_listener);
1717
}
1818

@@ -47,8 +47,9 @@ class BottomNavBar extends StatelessWidget {
4747
onTap: (index) {
4848
context.read<NavBarController>().item = NavBarItem.values[index];
4949
},
50-
currentIndex: context
51-
.select((NavBarController controller) => controller.item.index),
50+
currentIndex: context.select(
51+
(NavBarController controller) => controller.item.index,
52+
),
5253
items: [
5354
BottomNavigationBarItem(
5455
label: l10n.topicsLabel,

lib/home/view/home_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class HomePage extends StatelessWidget {
99
const HomePage._();
1010

1111
static Page<void> page() => const MaterialPage<void>(
12-
key: ValueKey('home_page'),
13-
child: HomePage._(),
14-
);
12+
key: ValueKey('home_page'),
13+
child: HomePage._(),
14+
);
1515

1616
@override
1717
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)