Skip to content

Commit 83d8fbf

Browse files
committed
chore: fix lints and update project
1 parent 11a4f84 commit 83d8fbf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+578
-645
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ Podfile.lock
8282
!**/ios/**/default.pbxuser
8383
!**/ios/**/default.perspectivev3
8484

85+
# macOS-related
86+
**/macos/**/Pods/
87+
**/macos/**/xcuserdata
88+
**/macos/**/Flutter/ephemeral
89+
90+
# Windows-related
91+
**/windows/flutter/ephemeral/
92+
93+
# Linux-related
94+
**/linux/flutter/ephemeral/
95+
8596
# Generated files
8697
*.dart.js
8798
*.info.json

sample_app/.gitignore

Lines changed: 0 additions & 46 deletions
This file was deleted.

sample_app/analysis_options.yaml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
1-
# This file configures the analyzer, which statically analyzes Dart code to
2-
# check for errors, warnings, and lints.
3-
#
4-
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5-
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6-
# invoked from the command line by running `flutter analyze`.
7-
8-
# The following line activates a set of recommended lints for Flutter apps,
9-
# packages, and plugins designed to encourage good coding practices.
10-
include: package:flutter_lints/flutter.yaml
1+
include: ../analysis_options.yaml
112

123
linter:
13-
# The lint rules applied to this project can be customized in the
14-
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15-
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at
17-
# https://dart-lang.github.io/linter/lints/index.html.
18-
#
19-
# Instead of disabling a lint rule for the entire project in the
20-
# section below, it can also be suppressed for a single line of code
21-
# or a specific dart file by using the `// ignore: name_of_lint` and
22-
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23-
# producing the lint.
244
rules:
25-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26-
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27-
28-
# Additional information about this file can be found at
29-
# https://dart.dev/guides/language/analysis-options
5+
cascade_invocations: false
6+
public_member_api_docs: false
7+
lines_longer_than_80_chars: false

sample_app/android/.gitignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

sample_app/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (flutterVersionName == null) {
2626
android {
2727
namespace "com.example.example"
2828

29-
compileSdkVersion 34
29+
compileSdkVersion 35
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
@@ -40,7 +40,7 @@ android {
4040
defaultConfig {
4141
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4242
applicationId "com.example.example"
43-
minSdkVersion 22
43+
minSdkVersion 23
4444
targetSdkVersion 34
4545
versionCode flutterVersionCode.toInteger()
4646
versionName flutterVersionName

sample_app/ios/.gitignore

Lines changed: 0 additions & 32 deletions
This file was deleted.

sample_app/ios/Podfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ target 'Runner' do
3232
use_modular_headers!
3333

3434
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35-
target 'RunnerTests' do
36-
inherit! :search_paths
37-
end
3835
end
3936

4037
post_install do |installer|

sample_app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
277277
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
278278
"${BUILT_PRODUCTS_DIR}/photo_manager/photo_manager.framework",
279+
"${BUILT_PRODUCTS_DIR}/record_darwin/record_darwin.framework",
279280
"${BUILT_PRODUCTS_DIR}/screen_brightness_ios/screen_brightness_ios.framework",
280281
"${BUILT_PRODUCTS_DIR}/sentry_flutter/sentry_flutter.framework",
281282
"${BUILT_PRODUCTS_DIR}/share_plus/share_plus.framework",
@@ -319,6 +320,7 @@
319320
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
320321
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
321322
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/photo_manager.framework",
323+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/record_darwin.framework",
322324
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/screen_brightness_ios.framework",
323325
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sentry_flutter.framework",
324326
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share_plus.framework",

sample_app/lib/app.dart

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import 'dart:async';
22

3-
import 'package:sample_app/pages/choose_user_page.dart';
4-
import 'package:sample_app/pages/splash_screen.dart';
5-
import 'package:sample_app/routes/app_routes.dart';
6-
import 'package:sample_app/routes/routes.dart';
7-
import 'package:sample_app/state/init_data.dart';
8-
import 'package:sample_app/utils/app_config.dart';
9-
import 'package:sample_app/utils/local_notification_observer.dart';
10-
import 'package:sample_app/utils/localizations.dart';
113
import 'package:firebase_core/firebase_core.dart';
124
import 'package:firebase_messaging/firebase_messaging.dart';
135
import 'package:flutter/foundation.dart';
@@ -16,14 +8,21 @@ import 'package:flutter/scheduler.dart';
168
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
179
import 'package:go_router/go_router.dart';
1810
import 'package:provider/provider.dart';
11+
import 'package:sample_app/firebase_options.dart';
12+
import 'package:sample_app/pages/choose_user_page.dart';
13+
import 'package:sample_app/pages/splash_screen.dart';
14+
import 'package:sample_app/routes/app_routes.dart';
15+
import 'package:sample_app/routes/routes.dart';
16+
import 'package:sample_app/state/init_data.dart';
17+
import 'package:sample_app/utils/app_config.dart';
18+
import 'package:sample_app/utils/local_notification_observer.dart';
19+
import 'package:sample_app/utils/localizations.dart';
1920
import 'package:sentry_flutter/sentry_flutter.dart';
2021
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
2122
import 'package:stream_chat_localizations/stream_chat_localizations.dart';
2223
import 'package:stream_chat_persistence/stream_chat_persistence.dart';
2324
import 'package:streaming_shared_preferences/streaming_shared_preferences.dart';
2425

25-
import 'firebase_options.dart';
26-
2726
/// Constructs callback for background notification handling.
2827
///
2928
/// Will be invoked from another Isolate, that's why it's required to
@@ -84,7 +83,6 @@ Future<void> _onFirebaseBackgroundMessage(RemoteMessage message) async {
8483

8584
final chatPersistentClient = StreamChatPersistenceClient(
8685
logLevel: Level.SEVERE,
87-
connectionMode: ConnectionMode.regular,
8886
);
8987

9088
void _sampleAppLogHandler(LogRecord record) async {
@@ -177,12 +175,11 @@ class _StreamChatSampleAppState extends State<StreamChatSampleApp>
177175
final token = await FirebaseMessaging.instance.getToken();
178176
debugPrint('[onTokenInit] #firebase; token: $token');
179177
if (token != null) {
180-
// replace with your push provider name, e.g., 'chat-flutter-firebase'
181-
const pushProviderName = null;
178+
// replace with your push provider, e.g., 'PushProvider.xiaomi'
179+
const pushProvider = PushProvider.firebase;
182180

183181
// add Token to Stream
184-
await client.addDevice(token, PushProvider.firebase,
185-
pushProviderName: pushProviderName);
182+
await client.addDevice(token, pushProvider);
186183
}
187184
}
188185
// User logged out

sample_app/lib/main.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import 'dart:async';
22

3-
import 'package:sample_app/app.dart';
4-
import 'package:sample_app/utils/app_config.dart';
53
import 'package:firebase_core/firebase_core.dart';
64
import 'package:flutter/foundation.dart';
75
import 'package:flutter/material.dart';
6+
import 'package:sample_app/app.dart';
7+
import 'package:sample_app/firebase_options.dart';
8+
import 'package:sample_app/utils/app_config.dart';
89
import 'package:sentry_flutter/sentry_flutter.dart';
910

10-
import 'firebase_options.dart';
11-
1211
Future<void> main() async {
1312
/// Captures errors reported by the Flutter framework.
1413
FlutterError.onError = (FlutterErrorDetails details) {

0 commit comments

Comments
 (0)