Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b7489d3

Browse filesBrowse files
authored
chore: Removed NStack feature integration (#161)
1 parent d58b095 commit b7489d3
Copy full SHA for b7489d3

File tree

16 files changed

+1456
-102
lines changed
Filter options

16 files changed

+1456
-102
lines changed

‎.github/workflows/pull_request_validation.yml

Copy file name to clipboardExpand all lines: .github/workflows/pull_request_validation.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: ♨️ Setup Java
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: '17'
22+
java-version: '21'
2323
distribution: 'temurin'
2424

2525
- name: 🐦 Setup Flutter

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ app.*.map.json
4747
# Flutter code generation
4848
*.freezed.dart
4949
*.g.dart
50-
nstack.dart
5150
*.gr.dart
5251
*.config.dart
5352
lib/gen/**
5453

5554
# Dependencies
56-
**.lock
55+
# Pubspec.lock should be checked out to git
56+
# to ensure everyone in the team is using the same version.
57+
# Recommended by Flutter as well.
58+
# We can git ignore Podfile.lock only.
59+
Podfile.lock

‎README.md

Copy file name to clipboardExpand all lines: README.md
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ This project serves as a template project for Flutter applications. You can gene
4444
- [Confluence](https://TODO)
4545
- [Slack Channel](https://TODO)
4646
- [OpenAPI Specification](https://TODO)
47-
- [NStack](https://TODO)
4847
- [Figma Design](https://TODO)

‎analysis_options.yaml

Copy file name to clipboardExpand all lines: analysis_options.yaml
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,5 @@ analyzer:
2222
- "**/*.g.dart"
2323
# Ignore warnings in files generated by Freezed specifically.
2424
- "**/*.freezed.dart"
25-
# Ignore warnings in files generated by NStack specifically.
26-
- "**/*nstack.dart"
2725
# Ignore bricks
2826
- bricks/**

‎android/app/build.gradle

Copy file name to clipboardExpand all lines: android/app/build.gradle
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def appName = "Monstarlab Flutter Template"
99

1010
// TODO: Change the applicationId for production
1111
// On staging it will add .staging and on development it will add .development as suffix.
12-
def applicationId = "com.monstarlab.flutter"
12+
def packageName = "com.monstarlab.flutter"
1313

1414
ext {
1515
androidMinSdkVersion = 21
@@ -18,9 +18,9 @@ ext {
1818

1919

2020
android {
21-
namespace = "$applicationId"
21+
namespace = "$packageName"
2222
compileSdk = androidCompileAndTargetSdkVersion
23-
ndkVersion = flutter.ndkVersion
23+
ndkVersion = "27.0.12077973"
2424

2525
compileOptions {
2626
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -32,7 +32,7 @@ android {
3232
}
3333

3434
defaultConfig {
35-
applicationId = "$applicationId"
35+
applicationId = "$packageName"
3636
// You can update the following values to match your application needs.
3737
// For more information, see: https://flutter.dev/to/review-gradle-config.
3838
minSdk = androidMinSdkVersion

‎android/app/proguard-rules.pro

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
2+
-dontwarn com.google.errorprone.annotations.CheckReturnValue
3+
-dontwarn com.google.errorprone.annotations.Immutable
4+
-dontwarn com.google.errorprone.annotations.RestrictedApi
5+
-dontwarn javax.annotation.Nullable
6+
-dontwarn javax.annotation.concurrent.GuardedBy

‎android/build.gradle

Copy file name to clipboardExpand all lines: android/build.gradle
-24Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,6 @@ allprojects {
66
}
77

88
rootProject.buildDir = "../build"
9-
// [NStack] the namespace property is null within
10-
// the android block of the build.gradle file for the nstack sdk.
11-
// Additionally, the Kotlin Gradle plugin is using a very old version there.
12-
subprojects {
13-
afterEvaluate { project ->
14-
if (project.name == 'nstack') {
15-
if (project.hasProperty('android')) {
16-
project.android {
17-
if (namespace == null) {
18-
namespace project.group
19-
}
20-
}
21-
project.buildscript {
22-
dependencies {
23-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
24-
}
25-
}
26-
}
27-
}
28-
}
29-
}
30-
// End of NStack workaround
31-
32-
339
subprojects {
3410
project.buildDir = "${rootProject.buildDir}/${project.name}"
3511
}

‎android/gradle/wrapper/gradle-wrapper.properties

Copy file name to clipboardExpand all lines: android/gradle/wrapper/gradle-wrapper.properties
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

‎android/settings.gradle

Copy file name to clipboardExpand all lines: android/settings.gradle
+2-2Lines 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 '7.4.2' apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version '8.7.2' apply false
22+
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
2323
}
2424

2525
include ":app"

‎lib/data/response_objects/error_response.dart

Copy file name to clipboardExpand all lines: lib/data/response_objects/error_response.dart
+11-12Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import 'package:flutter_template/domain/common/response_error/response_error.dart';
2-
import 'package:flutter_template/nstack/nstack.dart';
32
import 'package:freezed_annotation/freezed_annotation.dart';
43

54
part 'error_response.freezed.dart';
65
part 'error_response.g.dart';
76

8-
///The BE should provide one unique code for each error, in this case the
9-
///error is being provided through errorName so we create an Enum for each
10-
///code we are aware of with a default value to unknown
7+
/// The BE should provide one unique code for each error, in this case the
8+
/// error is being provided through errorName so we create an Enum for each
9+
/// code we are aware of with a default value to unknown
1110
@freezed
1211
class APIError with _$APIError {
1312
const factory APIError({
@@ -27,9 +26,9 @@ class APIError with _$APIError {
2726
@freezed
2827
class ErrorResponse with _$ErrorResponse {
2928
const factory ErrorResponse({
30-
//TODO: name this according to the map key from the error response
31-
//if no map key exists then just create this factory with the APIError values
32-
//and remove APIError,
29+
// TODO: name this according to the map key from the error response
30+
// if no map key exists then just create this factory with the APIError values
31+
// and remove APIError,
3332
required APIError error,
3433
}) = _ErrorResponse;
3534

@@ -38,7 +37,7 @@ class ErrorResponse with _$ErrorResponse {
3837
}
3938

4039
enum ErrorName {
41-
//Add error enum and the BE value
40+
// Add error enum and the BE value
4241
@JsonValue('errorExample')
4342
errorExample,
4443
unknown,
@@ -53,13 +52,13 @@ extension ErrorResponseExtensions on ErrorResponse {
5352
}
5453

5554
extension ErrorNameExtensions on ErrorName {
56-
String getErrorMessage(Localization l10n) {
55+
String getErrorMessage() {
5756
switch (this) {
58-
//Handle error enum and return mapped nstack value
57+
// TODO: Handle error enum and return mapped localized value
5958
case ErrorName.errorExample:
60-
return l10n.error.authenticationError;
59+
return 'Error Occurred';
6160
default:
62-
return '';
61+
return 'Unexpected Error';
6362
}
6463
}
6564
}

‎lib/domain/common/response_error/response_error.dart

Copy file name to clipboardExpand all lines: lib/domain/common/response_error/response_error.dart
+20-22Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'dart:io';
33
import 'package:dio/dio.dart';
44
import 'package:flutter/foundation.dart';
55
import 'package:flutter_template/data/response_objects/error_response.dart';
6-
import 'package:flutter_template/nstack/nstack.dart';
76
import 'package:freezed_annotation/freezed_annotation.dart';
87

98
part 'response_error.freezed.dart';
@@ -91,28 +90,27 @@ sealed class ResponseError<T> with _$ResponseError<T> implements Exception {
9190
}
9291

9392
extension ResponseErrorExtensions on ResponseError {
94-
String getErrorMessage(Localization l10n) {
95-
//TODO: create error module for errors and set value accordingly
93+
String getErrorMessage() {
9694
return when<String>(
97-
noInternetConnection: () => l10n.error.connectionError,
98-
sendTimeout: () => l10n.error.authenticationError,
99-
connectTimeout: () => l10n.error.authenticationError,
100-
receiveTimeout: () => l10n.error.authenticationError,
101-
badRequest: (message) => message.getErrorMessage(l10n),
102-
notFound: () => l10n.error.authenticationError,
103-
tooManyRequests: () => l10n.error.authenticationError,
104-
unprocessableEntity: () => l10n.error.authenticationError,
105-
internalServerError: () => l10n.error.authenticationError,
106-
unexpectedError: () => l10n.error.authenticationError,
107-
requestCancelled: () => l10n.error.authenticationError,
108-
conflict: () => l10n.error.authenticationError,
109-
unauthorized: () => l10n.error.authenticationError,
110-
invalidPassword: () => l10n.error.authenticationError,
111-
invalidEmail: () => l10n.error.authenticationError,
112-
invalidSearchTerm: () => l10n.error.authenticationError,
113-
invalidLoginCredentials: () => l10n.error.authenticationError,
114-
badCertificate: () => l10n.error.authenticationError,
115-
connectionError: () => l10n.error.connectionError,
95+
noInternetConnection: () => 'No Internet Connection',
96+
sendTimeout: () => 'Send Timeout Error',
97+
connectTimeout: () => 'Connection Timeout Error',
98+
receiveTimeout: () => 'Receive Timeout Error',
99+
badRequest: (message) => message.getErrorMessage(),
100+
notFound: () => 'Not Found Error',
101+
tooManyRequests: () => 'Too Many Requests',
102+
unprocessableEntity: () => 'Unprocessable Entity',
103+
internalServerError: () => 'Internal Server Error',
104+
unexpectedError: () => 'Unexpected Error',
105+
requestCancelled: () => 'Request Cancelled',
106+
conflict: () => 'Conflict Error',
107+
unauthorized: () => 'Unauthorized Error',
108+
invalidPassword: () => 'Invalid Password',
109+
invalidEmail: () => 'Invalid Email',
110+
invalidSearchTerm: () => 'Invalid Search Term',
111+
invalidLoginCredentials: () => 'Invalid Login Credentials',
112+
badCertificate: () => 'Bad Certificate',
113+
connectionError: () => 'Connection Error',
116114
);
117115
}
118116
}

‎lib/nstack/nstack.json

Copy file name to clipboardExpand all lines: lib/nstack/nstack.json
-5Lines changed: 0 additions & 5 deletions
This file was deleted.

‎lib/presentation/app.dart

Copy file name to clipboardExpand all lines: lib/presentation/app.dart
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:auto_route/auto_route.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_template/injection/injector.dart';
4-
import 'package:flutter_template/nstack/nstack.dart';
54
import 'package:flutter_template/presentation/resources/resources.dart';
65
import 'package:flutter_template/presentation/routes/router.dart';
76

@@ -20,15 +19,6 @@ class App extends StatelessWidget {
2019
themeMode: ThemeMode.system,
2120
// TODO: Change Project Name Here
2221
title: 'Monstarlab Flutter Template',
23-
builder: (c, widget) {
24-
if (widget == null) {
25-
return const SizedBox();
26-
}
27-
28-
return NStackWidget(
29-
child: widget,
30-
);
31-
},
3222
routerDelegate: AutoRouterDelegate(
3323
appRouter,
3424
),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.