chore: bump flutter version to 3.27.2. (#493)

This commit is contained in:
Jojo Feng
2025-01-19 22:32:03 -08:00
committed by GitHub
parent f07254dbd4
commit 0897abf27e
20 changed files with 332 additions and 285 deletions

View File

@ -16,7 +16,7 @@ PODS:
- OrderedSet (~> 6.0.3)
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_native_splash (0.0.1):
- flutter_native_splash (2.4.3):
- Flutter
- flutter_secure_storage (6.0.0):
- Flutter
@ -41,7 +41,7 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.3):
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- synced_shared_preferences (0.0.1):
@ -52,6 +52,7 @@ PODS:
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter
- FlutterMacOS
- workmanager (0.0.1):
- Flutter
@ -72,11 +73,11 @@ DEPENDENCIES:
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- synced_shared_preferences (from `.symlinks/plugins/synced_shared_preferences/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)
- workmanager (from `.symlinks/plugins/workmanager/ios`)
SPEC REPOS:
@ -117,8 +118,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
synced_shared_preferences:
:path: ".symlinks/plugins/synced_shared_preferences/ios"
url_launcher_ios:
@ -126,34 +127,34 @@ EXTERNAL SOURCES:
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"
workmanager:
:path: ".symlinks/plugins/workmanager/ios"
SPEC CHECKSUMS:
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
connectivity_plus: 18382e7311ba19efcaee94442b23b32507b20695
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_email_sender: 10a22605f92809a11ef52b2f412db806c6082d40
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
flutter_local_notifications: df98d66e515e1ca797af436137b4459b160ad8c9
flutter_native_splash: f71420956eb811e6d310720fee915f1d42852e7a
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
in_app_review: 318597b3a06c22bb46dc454d56828c85f444f99d
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
receive_sharing_intent: 753f808c6be5550247f6a20f2a14972466a5f33c
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
synced_shared_preferences: f722742b06d65c7315b8e9f56b794c9fbd5597f7
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4
workmanager: 0afdcf5628bbde6924c21af7836fed07b42e30e6
PODFILE CHECKSUM: f03c7c11cf2b623592c89c68c628682778bb78b4

View File

@ -499,7 +499,7 @@ class CommentsCubit extends Cubit<CommentsState> with Loggable {
? state.comments.elementAt(e.index - 1)
: null,
)
.whereNotNull()
.nonNulls
.toList();
if (onScreenComments.isEmpty && state.comments.isNotEmpty) {
@ -557,7 +557,7 @@ class CommentsCubit extends Cubit<CommentsState> with Loggable {
? state.comments.elementAt(e.index - 1)
: null,
)
.whereNotNull()
.nonNulls
.toList();
/// The index of first comment visible on screen.

View File

@ -5,7 +5,6 @@ import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:equatable/equatable.dart';
import 'package:feature_discovery/feature_discovery.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
@ -54,9 +53,7 @@ Future<void> main({bool testing = false}) async {
Hive.init(tempPath);
final HydratedStorage storage = await HydratedStorage.build(
storageDirectory: kIsWeb
? HydratedStorage.webStorageDirectory
: await getTemporaryDirectory(),
storageDirectory: HydratedStorageDirectory(tempPath),
);
HydratedBloc.storage = storage;
@ -314,15 +311,16 @@ class HackiApp extends StatelessWidget {
? Palette.black
: null,
dividerTheme: DividerThemeData(
color: Palette.grey.withOpacity(0.2),
color: Palette.grey.withValues(alpha: 0.2),
),
switchTheme: SwitchThemeData(
trackColor: WidgetStateProperty.resolveWith(
(Set<WidgetState> states) {
if (states.contains(WidgetState.selected)) {
return colorScheme.primary.withOpacity(0.6);
return colorScheme.primary
.withValues(alpha: 0.6);
} else {
return Palette.grey.withOpacity(0.2);
return Palette.grey.withValues(alpha: 0.2);
}
},
),
@ -345,13 +343,13 @@ class HackiApp extends StatelessWidget {
color: (isDarkModeEnabled
? Palette.white
: Palette.black)
.withOpacity(0.4),
.withValues(alpha: 0.4),
),
),
),
sliderTheme: SliderThemeData(
inactiveTrackColor:
colorScheme.primary.withOpacity(0.5),
colorScheme.primary.withValues(alpha: 0.5),
activeTrackColor: colorScheme.primary,
thumbColor: colorScheme.primary,
),

View File

@ -279,7 +279,7 @@ class HackerNewsWebRepository with Loggable {
final List<Element> elements =
document.querySelectorAll(_aThingSelector);
final Iterable<int> parsedIds =
elements.map((Element e) => int.tryParse(e.id)).whereNotNull();
elements.map((Element e) => int.tryParse(e.id)).nonNulls;
return parsedIds;
} on DioException catch (e) {
if (_rateLimitedStatusCode.contains(e.response?.statusCode)) {

View File

@ -7,7 +7,6 @@ import 'package:hacki/models/models.dart';
import 'package:hacki/services/services.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
import 'package:sembast/sembast.dart';
import 'package:sembast/sembast_io.dart';
/// [SembastRepository] is for storing stories and comments for faster loading.

View File

@ -45,8 +45,9 @@ class PinnedStories extends StatelessWidget {
],
),
child: ColoredBox(
color:
Theme.of(context).colorScheme.primary.withOpacity(0.2),
color: Theme.of(context).colorScheme.primary.withValues(
alpha: 0.2,
),
child: StoryTile(
key: ValueKey<String>('${story.id}-PinnedStoryTile'),
story: story,
@ -63,7 +64,10 @@ class PinnedStories extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: Dimens.pt12),
child: Divider(
color: Theme.of(context).colorScheme.primary.withOpacity(0.8),
color: Theme.of(context)
.colorScheme
.primary
.withValues(alpha: 0.8),
),
),
],

View File

@ -309,7 +309,7 @@ class _ItemScreenState extends State<ItemScreen>
context: context,
backgroundColor: Theme.of(context)
.canvasColor
.withOpacity(0.6),
.withValues(alpha: 0.6),
foregroundColor:
Theme.of(context).iconTheme.color,
item: widget.item,
@ -351,7 +351,7 @@ class _ItemScreenState extends State<ItemScreen>
appBar: CustomAppBar(
context: context,
backgroundColor:
Theme.of(context).canvasColor.withOpacity(0.6),
Theme.of(context).canvasColor.withValues(alpha: 0.6),
foregroundColor: Theme.of(context).iconTheme.color,
item: widget.item,
onFontSizeTap: onFontSizeTapped,

View File

@ -17,7 +17,9 @@ class LogScreen extends StatelessWidget {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
backgroundColor: Theme.of(context).canvasColor.withOpacity(0.6),
backgroundColor: Theme.of(context).canvasColor.withValues(
alpha: 0.6,
),
elevation: 0,
actions: <Widget>[
if (snapshot.data != null)

View File

@ -88,7 +88,7 @@ class InboxView extends StatelessWidget {
child: LinearProgressIndicator(
color: Theme.of(context)
.primaryColor
.withOpacity(0.1),
.withValues(alpha: 0.1),
),
),
FadeIn(
@ -130,7 +130,8 @@ class InboxView extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.primary
.withOpacity(
.withValues(
alpha:
unreadCommentsIds.contains(e.id)
? 1
: 0.6,

View File

@ -221,9 +221,6 @@ class _SettingsState extends State<Settings> with ItemActionMixin, Loggable {
bool isInProgress,
) {
return DropdownMenu<HackerNewsDataSource>(
/// Make sure no stories are being fetched
/// before switching data source.
enabled: !isInProgress,
initialSelection: preferenceState.dataSource,
dropdownMenuEntries:
HackerNewsDataSource.values

View File

@ -224,7 +224,7 @@ class CommentTile extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.primary
.withOpacity(0.8),
.withValues(alpha: 0.8),
)
else if (comment.hidden)
const CenteredText.hidden()
@ -311,7 +311,7 @@ class CommentTile extends StatelessWidget {
Theme.of(context).canvasColor != Palette.white ? 0.03 : 0.15;
final Color commentColor = prefState.isEyeCandyEnabled
? color.withOpacity(commentBackgroundColorOpacity)
? color.withValues(alpha: commentBackgroundColorOpacity)
: Palette.transparent;
final bool isMyComment = comment.deleted == false &&
context.read<AuthBloc>().state.username == comment.by;
@ -322,7 +322,9 @@ class CommentTile extends StatelessWidget {
return Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary.withOpacity(0.2),
color: Theme.of(context).colorScheme.primary.withValues(
alpha: 0.2,
),
),
child: wrapper,
);
@ -349,7 +351,7 @@ class CommentTile extends StatelessWidget {
)
: null,
color: shouldHighlight
? primaryColor.withOpacity(0.2)
? primaryColor.withValues(alpha: 0.2)
: commentColor,
),
child: wrapper,
@ -387,7 +389,7 @@ class CommentTile extends StatelessWidget {
}
final double opacity = ((10 - level) / 10).clamp(0.3, 1);
final Color color = primaryColor.withOpacity(opacity);
final Color color = primaryColor.withValues(alpha: opacity);
levelToBorderColors[cacheKey] = color;
return color;

View File

@ -390,7 +390,7 @@ TextSpan buildTextSpan(
return TextSpan(
text: element.text,
style: style?.copyWith(
backgroundColor: primaryColor.withOpacity(0.3),
backgroundColor: primaryColor.withValues(alpha: 0.3),
),
);
} else if (element is EmphasisElement) {

View File

@ -69,8 +69,9 @@ class _DownloadProgressReminderState extends State<DownloadProgressReminder>
const Spacer(),
LinearProgressIndicator(
value: progress,
color:
Theme.of(context).colorScheme.primary.withOpacity(0.5),
color: Theme.of(context).colorScheme.primary.withValues(
alpha: 0.5,
),
),
],
),

View File

@ -29,7 +29,7 @@ class OfflineBanner extends StatelessWidget {
textAlign: showExitButton ? TextAlign.left : TextAlign.center,
),
backgroundColor:
Theme.of(context).colorScheme.primary.withOpacity(0.3),
Theme.of(context).colorScheme.primary.withValues(alpha: 0.3),
actions: <Widget>[
if (showExitButton)
TextButton(

View File

@ -272,7 +272,7 @@ class _LinkPreviewPlaceholder extends StatelessWidget {
child: Shimmer.fromColors(
baseColor: Theme.of(context).colorScheme.primary,
highlightColor:
Theme.of(context).colorScheme.primary.withOpacity(0.8),
Theme.of(context).colorScheme.primary.withValues(alpha: 0.8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[

View File

@ -502,7 +502,9 @@ ${info.toJson()}
final String? desc =
_getMetaContent(document, 'property', 'og:description');
if (desc != null &&
!desc.contains('JavaScript is disabled in your browser')) return desc;
!desc.contains('JavaScript is disabled in your browser')) {
return desc;
}
final String? description =
_getMetaContent(document, 'name', 'description') ??

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
extension ThemeDataExtension on ThemeData {
Color get readGrey => colorScheme.onSurface.withOpacity(0.6);
Color get readGrey => colorScheme.onSurface.withValues(alpha: 0.6);
Color get metadataColor => colorScheme.onSurface.withOpacity(0.8);
Color get metadataColor => colorScheme.onSurface.withValues(alpha: 0.8);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,24 @@
name: hacki
description: A Hacker News reader.
version: 2.9.7+155
version: 2.10.0+156
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: "3.24.3"
flutter: "3.27.2"
dependencies:
adaptive_theme: ^3.2.0
animations: ^2.0.8
badges: ^3.0.2
bloc: ^8.1.1
bloc_concurrency: ^0.2.5
bloc: ^9.0.0
bloc_concurrency: ^0.3.0
cached_network_image: ^3.3.0
collection: ^1.17.1
collection: ^1.19.0
connectivity_plus: ^6.0.3
device_info_plus: ^10.1.0
device_info_plus: ^11.2.1
dio: ^5.7.0
dio_smart_retry: ^6.0.0
dio_smart_retry: ^7.0.1
equatable: ^2.0.5
fast_gbk: ^1.0.0
feature_discovery:
@ -27,49 +27,49 @@ dependencies:
ref: bcf4ef28542acb0c98ec7dfa9d20d8fa7a0a594b
flutter:
sdk: flutter
flutter_bloc: ^8.1.5
flutter_bloc: ^9.0.0
flutter_cache_manager: ^3.3.2
flutter_email_sender: ^6.0.3
flutter_fadein: ^2.0.0
flutter_feather_icons: 2.0.0+1
flutter_inappwebview: ^6.1.5
flutter_local_notifications: ^17.1.2
flutter_local_notifications: ^18.0.1
flutter_material_color_picker: ^1.2.0
flutter_native_splash: ^2.4.1
flutter_secure_storage: ^9.2.2
flutter_native_splash: ^2.4.4
flutter_secure_storage: ^9.2.4
flutter_slidable: ^3.0.0
font_awesome_flutter: ^10.3.0
get_it: ^7.7.0
get_it: ^8.0.3
go_router: ^14.1.4
hive: ^2.2.3
html: ^0.15.1
html_unescape: ^2.0.0
http: ^1.1.0
hydrated_bloc: ^9.1.5
hydrated_bloc: ^10.0.0
in_app_review:
path: components/in_app_review
intl: ^0.19.0
intl: ^0.20.1
linkify: ^5.0.0
logger: ^2.4.0
memoize: ^3.0.0
package_info_plus: ^8.0.0
path: ^1.8.2
path_provider: ^2.1.3
path_provider_android: ^2.2.5
path_provider_foundation: ^2.4.0
pretty_dio_logger: ^1.3.1
path: ^1.9.0
path_provider: ^2.1.5
path_provider_android: ^2.2.15
path_provider_foundation: ^2.4.1
pretty_dio_logger: ^1.4.0
pull_to_refresh:
git:
url: https://github.com/livinglist/flutter_pulltorefresh
ref: master
qr_code_scanner: ^1.0.1
qr_flutter: ^4.1.0
receive_sharing_intent: 1.5.4
receive_sharing_intent: ^1.5.3
responsive_builder: ^0.7.0
rxdart: ^0.27.7
rxdart: ^0.28.0
scrollable_positioned_list: ^0.3.5
sembast: ^3.7.1
share_plus: ^9.0.0
share_plus: ^10.1.4
shared_preferences: ^2.2.3
shared_preferences_android: ^2.2.3
shared_preferences_foundation: ^2.4.0
@ -87,7 +87,7 @@ dependency_overrides:
web: ^1.0.0
dev_dependencies:
bloc_test: ^9.1.0
bloc_test: ^10.0.0
flutter_driver:
sdk: flutter
flutter_test:
@ -95,7 +95,7 @@ dev_dependencies:
integration_test:
sdk: flutter
mocktail: ^1.0.0
very_good_analysis: ^5.0.0
very_good_analysis: ^7.0.0
flutter:
uses-material-design: true