Update versions of dependencies to work with new XCode

codemagic-setup
Hank Grabowski 2023-10-30 21:44:16 -04:00
rodzic 9201029571
commit 73dfc3cc2b
63 zmienionych plików z 724 dodań i 557 usunięć

Wyświetl plik

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 33 compileSdkVersion 34
ndkVersion flutter.ndkVersion ndkVersion flutter.ndkVersion
compileOptions { compileOptions {

Wyświetl plik

@ -1,12 +1,12 @@
buildscript { buildscript {
ext.kotlin_version = '1.6.10' ext.kotlin_version = '1.9.10'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.2' classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }

Wyświetl plik

@ -157,7 +157,7 @@
97C146E61CF9000F007C117D /* Project object */ = { 97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1300; LastUpgradeCheck = 1430;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {

Wyświetl plik

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1300" LastUpgradeVersion = "1430"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

Wyświetl plik

@ -13,7 +13,7 @@ import 'video_player_lib_av_control.dart';
final _shownVideos = <String>{}; final _shownVideos = <String>{};
final _useVideoPlayer = kIsWeb; const _useVideoPlayer = kIsWeb;
final _useMediaKit = Platform.isAndroid || final _useMediaKit = Platform.isAndroid ||
Platform.isIOS || Platform.isIOS ||
Platform.isWindows || Platform.isWindows ||

Wyświetl plik

@ -29,26 +29,17 @@ class _MediaKitAvControlState extends State<MediaKitAvControl> {
), ),
); );
VideoController? controller; VideoController? controller;
var needToOpen = true;
var playing = false;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
Future.microtask(() async { controller = VideoController(player);
_logger.info('initializing'); player.open(Media(widget.videoUrl), play: false);
controller = await VideoController.create(player);
_logger.info('initialized');
if (context.mounted) {
setState(() {});
}
});
} }
@override @override
void dispose() { void dispose() {
Future.microtask(() async { Future.microtask(() async {
await controller?.dispose();
await player.dispose(); await player.dispose();
}); });
super.dispose(); super.dispose();
@ -57,50 +48,16 @@ class _MediaKitAvControlState extends State<MediaKitAvControl> {
@override @override
void deactivate() { void deactivate() {
player.pause(); player.pause();
playing = false;
super.deactivate(); super.deactivate();
} }
Future<void> toggleVideoPlay() async {
_logger.fine('Toggling play on: ${widget.videoUrl}');
if (needToOpen) {
await player.open(Media(widget.videoUrl), play: false);
needToOpen = false;
}
if (playing) {
await player.pause();
playing = false;
} else {
await player.play();
playing = true;
}
setState(() {});
}
void resetPlay() async {
if (playing) {
await player.pause();
}
await player.seek(Duration.zero);
if (playing) {
playing = false;
await player.play();
playing = true;
}
setState(() {});
}
double? get height => widget.height == null ? null : widget.height! - 50; double? get height => widget.height == null ? null : widget.height! - 50;
double? get width => widget.width; double? get width => widget.width;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
_logger.finer( _logger.finer('Building MediaKit Control for ${widget.videoUrl}');
'Building MediaKit Control playing? $playing for ${widget.videoUrl}');
if (controller == null) { if (controller == null) {
return Container( return Container(
width: widget.width, width: widget.width,
@ -117,39 +74,16 @@ class _MediaKitAvControlState extends State<MediaKitAvControl> {
} }
return GestureDetector( return GestureDetector(
onTap: toggleVideoPlay,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: Video( child: Video(
controller: controller, controller: controller!,
width: width, width: width,
height: height, height: height,
), ),
), ),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
icon: playing
? const Icon(Icons.pause)
: const Icon(Icons.play_arrow),
onPressed: toggleVideoPlay,
),
IconButton(onPressed: resetPlay, icon: const Icon(Icons.replay)),
if (widget.onGoFullScreen != null)
IconButton(
onPressed: () async {
if (playing) {
await toggleVideoPlay();
}
await widget.onGoFullScreen!();
},
icon: const Icon(Icons.fullscreen),
)
],
)
], ],
), ),
); );

Wyświetl plik

@ -5,10 +5,10 @@ import '../../services/hashtag_service.dart';
class HashtagAutocompleteOptions extends StatelessWidget { class HashtagAutocompleteOptions extends StatelessWidget {
const HashtagAutocompleteOptions({ const HashtagAutocompleteOptions({
Key? key, super.key,
required this.query, required this.query,
required this.onHashtagTap, required this.onHashtagTap,
}) : super(key: key); });
final String query; final String query;
final ValueSetter<String> onHashtagTap; final ValueSetter<String> onHashtagTap;

Wyświetl plik

@ -11,10 +11,10 @@ class MentionAutocompleteOptions extends StatelessWidget {
static final _logger = Logger('$MentionAutocompleteOptions'); static final _logger = Logger('$MentionAutocompleteOptions');
const MentionAutocompleteOptions({ const MentionAutocompleteOptions({
Key? key, super.key,
required this.query, required this.query,
required this.onMentionUserTap, required this.onMentionUserTap,
}) : super(key: key); });
final String query; final String query;
final ValueSetter<Connection> onMentionUserTap; final ValueSetter<Connection> onMentionUserTap;

Wyświetl plik

@ -46,7 +46,7 @@ class _MediaUploadEditorControlState extends State<MediaUploadEditorControl> {
alignLabelWithHint: true, alignLabelWithHint: true,
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).backgroundColor, color: Theme.of(context).colorScheme.background,
), ),
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),
@ -56,7 +56,7 @@ class _MediaUploadEditorControlState extends State<MediaUploadEditorControl> {
)), )),
IconButton( IconButton(
onPressed: widget.onDelete, onPressed: widget.onDelete,
icon: Icon(Icons.cancel), icon: const Icon(Icons.cancel),
), ),
], ],
), ),
@ -72,7 +72,7 @@ class _MediaUploadEditorControlState extends State<MediaUploadEditorControl> {
alignLabelWithHint: true, alignLabelWithHint: true,
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).backgroundColor, color: Theme.of(context).colorScheme.background,
), ),
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),

Wyświetl plik

@ -69,13 +69,13 @@ class NotificationControl extends StatelessWidget {
height: iconSize, height: iconSize,
onTap: () async { onTap: () async {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': notification.fromId}); pathParameters: {'id': notification.fromId});
}, },
), ),
onError: (error) => GestureDetector( onError: (error) => GestureDetector(
onTap: () async { onTap: () async {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': notification.fromId}); pathParameters: {'id': notification.fromId});
}, },
child: const SizedBox( child: const SizedBox(
width: iconSize, width: iconSize,
@ -90,7 +90,7 @@ class NotificationControl extends StatelessWidget {
case NotificationType.follow: case NotificationType.follow:
onTap = () { onTap = () {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': notification.fromId}); pathParameters: {'id': notification.fromId});
}; };
break; break;
case NotificationType.follow_request: case NotificationType.follow_request:
@ -113,7 +113,7 @@ class NotificationControl extends StatelessWidget {
case NotificationType.direct_message: case NotificationType.direct_message:
onTap = () => context.pushNamed( onTap = () => context.pushNamed(
ScreenPaths.thread, ScreenPaths.thread,
queryParams: {'uri': notification.iid}, queryParameters: {'uri': notification.iid},
); );
break; break;
} }
@ -147,7 +147,7 @@ class NotificationControl extends StatelessWidget {
logError(error, _logger); logError(error, _logger);
}); });
}, },
icon: Icon(Icons.close_rounded)), icon: const Icon(Icons.close_rounded)),
); );
} }
} }

Wyświetl plik

@ -31,6 +31,7 @@ class _SearchResultStatusControlState extends State<SearchResultStatusControl> {
@override @override
void initState() { void initState() {
super.initState();
showContent = widget.status.spoilerText.isEmpty; showContent = widget.status.spoilerText.isEmpty;
} }
@ -48,7 +49,7 @@ class _SearchResultStatusControlState extends State<SearchResultStatusControl> {
BoxShadow( BoxShadow(
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,
blurRadius: 2, blurRadius: 2,
offset: Offset(4, 4), offset: const Offset(4, 4),
spreadRadius: 0.1, spreadRadius: 0.1,
blurStyle: BlurStyle.normal, blurStyle: BlurStyle.normal,
) )
@ -137,7 +138,7 @@ class _SearchResultStatusControlState extends State<SearchResultStatusControl> {
); );
}, },
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
return HorizontalPadding(); return const HorizontalPadding();
}, },
itemCount: items.length)); itemCount: items.length));
} }

Wyświetl plik

@ -46,13 +46,13 @@ class StandardAppDrawer extends StatelessWidget {
title: Text( title: Text(
p.username, p.username,
style: p == getIt<AccountsService>().currentProfile style: p == getIt<AccountsService>().currentProfile
? TextStyle(fontWeight: FontWeight.bold) ? const TextStyle(fontWeight: FontWeight.bold)
: null, : null,
), ),
subtitle: Text( subtitle: Text(
p.serverName, p.serverName,
style: p == getIt<AccountsService>().currentProfile style: p == getIt<AccountsService>().currentProfile
? TextStyle(fontWeight: FontWeight.bold) ? const TextStyle(fontWeight: FontWeight.bold)
: null, : null,
), ),
), ),

Wyświetl plik

@ -237,7 +237,7 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> {
); );
}, },
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
return HorizontalPadding(); return const HorizontalPadding();
}, },
itemCount: items.length)); itemCount: items.length));
} }

Wyświetl plik

@ -186,7 +186,7 @@ class _InteractionsBarControlState extends State<InteractionsBarControl> {
Icons.thumb_up, Icons.thumb_up,
semanticLabel: 'Like', semanticLabel: 'Like',
) )
: Icon(Icons.thumb_up_outlined)), : const Icon(Icons.thumb_up_outlined)),
if (isPost) if (isPost)
IconButton( IconButton(
onPressed: widget.isMine && !widget.entry.youReshared onPressed: widget.isMine && !widget.entry.youReshared
@ -200,7 +200,7 @@ class _InteractionsBarControlState extends State<InteractionsBarControl> {
youReshared ? Icons.repeat_on_outlined : Icons.repeat)), youReshared ? Icons.repeat_on_outlined : Icons.repeat)),
IconButton( IconButton(
onPressed: isProcessing ? null : addComment, onPressed: isProcessing ? null : addComment,
icon: Icon(Icons.add_comment)), icon: const Icon(Icons.add_comment)),
]), ]),
], ],
); );

Wyświetl plik

@ -25,7 +25,7 @@ class LinkPreviewControl extends StatelessWidget {
}, },
child: Row( child: Row(
children: [ children: [
Container( SizedBox(
width: width, width: width,
child: CachedNetworkImage(imageUrl: preview.selectedImageUrl), child: CachedNetworkImage(imageUrl: preview.selectedImageUrl),
), ),

Wyświetl plik

@ -27,7 +27,7 @@ class StatusHeaderControl extends StatelessWidget {
}); });
void goToProfile(BuildContext context, String id) { void goToProfile(BuildContext context, String id) {
context.pushNamed(ScreenPaths.userProfile, params: {'id': id}); context.pushNamed(ScreenPaths.userProfile, pathParameters: {'id': id});
} }
@override @override
@ -66,7 +66,7 @@ class StatusHeaderControl extends StatelessWidget {
children: [ children: [
ImageControl( ImageControl(
imageUrl: author.avatarUrl.toString(), imageUrl: author.avatarUrl.toString(),
iconOverride: Icon(Icons.person), iconOverride: const Icon(Icons.person),
width: 32.0, width: 32.0,
onTap: () => goToProfile(context, author.id), onTap: () => goToProfile(context, author.id),
), ),
@ -79,7 +79,7 @@ class StatusHeaderControl extends StatelessWidget {
onTap: () => goToProfile(context, author.id), onTap: () => goToProfile(context, author.id),
child: Text( child: Text(
author.name, author.name,
style: Theme.of(context).textTheme.bodyText1, style: Theme.of(context).textTheme.bodyLarge,
), ),
), ),
], ],
@ -94,7 +94,7 @@ class StatusHeaderControl extends StatelessWidget {
children: [ children: [
ImageControl( ImageControl(
imageUrl: reshareAuthor.avatarUrl.toString(), imageUrl: reshareAuthor.avatarUrl.toString(),
iconOverride: Icon(Icons.person), iconOverride: const Icon(Icons.person),
width: 32.0, width: 32.0,
onTap: () => goToProfile(context, reshareAuthor.id), onTap: () => goToProfile(context, reshareAuthor.id),
), ),
@ -103,7 +103,7 @@ class StatusHeaderControl extends StatelessWidget {
onTap: () => goToProfile(context, reshareAuthor.id), onTap: () => goToProfile(context, reshareAuthor.id),
child: Text( child: Text(
reshareAuthor.name, reshareAuthor.name,
style: Theme.of(context).textTheme.bodyText1, style: Theme.of(context).textTheme.bodyLarge,
), ),
), ),
], ],
@ -112,7 +112,7 @@ class StatusHeaderControl extends StatelessWidget {
if (showIsCommentText && entry.parentId.isNotEmpty) if (showIsCommentText && entry.parentId.isNotEmpty)
Text( Text(
' ...made a comment:', ' ...made a comment:',
style: Theme.of(context).textTheme.bodyText1, style: Theme.of(context).textTheme.bodyLarge,
), ),
], ],
), ),
@ -120,7 +120,7 @@ class StatusHeaderControl extends StatelessWidget {
children: [ children: [
Text( Text(
ElapsedDateUtils.epochSecondsToString(entry.backdatedTimestamp), ElapsedDateUtils.epochSecondsToString(entry.backdatedTimestamp),
style: Theme.of(context).textTheme.caption, style: Theme.of(context).textTheme.bodySmall,
), ),
const HorizontalPadding(), const HorizontalPadding(),
Icon( Icon(
@ -128,7 +128,7 @@ class StatusHeaderControl extends StatelessWidget {
? Icons.public ? Icons.public
: Icons.lock, : Icons.lock,
color: Theme.of(context).hintColor, color: Theme.of(context).hintColor,
size: Theme.of(context).textTheme.caption?.fontSize, size: Theme.of(context).textTheme.bodySmall?.fontSize,
), ),
], ],
), ),

Wyświetl plik

@ -327,7 +327,7 @@ class InteractionsClient extends FriendicaClient {
_networkStatusService.startInteractionsLoading(); _networkStatusService.startInteractionsLoading();
final result = (await runCatchingAsync(() async { final result = (await runCatchingAsync(() async {
final url = 'https://$serverName/api/v1/statuses/$id/favourited_by'; final url = 'https://$serverName/api/v1/statuses/$id/favourited_by';
final request = Uri.parse('$url'); final request = Uri.parse(url);
_logger.finest(() => 'Getting favorites for status $id'); _logger.finest(() => 'Getting favorites for status $id');
return (await _getApiListRequest(request) return (await _getApiListRequest(request)
.andThenSuccessAsync((jsonArray) async { .andThenSuccessAsync((jsonArray) async {
@ -346,7 +346,7 @@ class InteractionsClient extends FriendicaClient {
_networkStatusService.startInteractionsLoading(); _networkStatusService.startInteractionsLoading();
final result = (await runCatchingAsync(() async { final result = (await runCatchingAsync(() async {
final url = 'https://$serverName/api/v1/statuses/$id/reblogged_by'; final url = 'https://$serverName/api/v1/statuses/$id/reblogged_by';
final request = Uri.parse('$url'); final request = Uri.parse(url);
_logger.finest(() => 'Getting rebloggers for status $id'); _logger.finest(() => 'Getting rebloggers for status $id');
return (await _getApiListRequest(request) return (await _getApiListRequest(request)
.andThenSuccessAsync((jsonArray) async { .andThenSuccessAsync((jsonArray) async {

Wyświetl plik

@ -14,7 +14,7 @@ class PagedResponse<T> {
T data; T data;
PagedResponse(this.data, {String? id, this.previous, this.next}) PagedResponse(this.data, {String? id, this.previous, this.next})
: id = id ?? Uuid().v4(); : id = id ?? const Uuid().v4();
bool get hasMorePages => previous != null || next != null; bool get hasMorePages => previous != null || next != null;

Wyświetl plik

@ -29,9 +29,8 @@ import 'utils/old_android_letsencrypte_cert.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
if (kReleaseMode) { MediaKit.ensureInitialized();
MediaKit.ensureInitialized();
}
// await dotenv.load(fileName: '.env'); // await dotenv.load(fileName: '.env');
const enablePreview = false; const enablePreview = false;
Logger.root.level = Level.FINER; Logger.root.level = Level.FINER;
@ -123,7 +122,6 @@ class App extends StatelessWidget {
), ),
], ],
child: MaterialApp.router( child: MaterialApp.router(
useInheritedMediaQuery: true,
locale: DevicePreview.locale(context), locale: DevicePreview.locale(context),
builder: DevicePreview.appBuilder, builder: DevicePreview.appBuilder,
theme: buildTheme( theme: buildTheme(

Wyświetl plik

@ -7,9 +7,11 @@ import '../exec_error.dart';
import 'credentials_intf.dart'; import 'credentials_intf.dart';
class BasicCredentials implements ICredentials { class BasicCredentials implements ICredentials {
@override
late final String id; late final String id;
final String username; final String username;
final String password; final String password;
@override
final String serverName; final String serverName;
late final String _authHeaderValue; late final String _authHeaderValue;

Wyświetl plik

@ -94,7 +94,7 @@ class OAuthCredentials implements ICredentials {
final idEndpoint = Uri.parse('https://$serverName/api/v1/apps'); final idEndpoint = Uri.parse('https://$serverName/api/v1/apps');
final response = await http.post(idEndpoint, body: { final response = await http.post(idEndpoint, body: {
'client_name': 'Relatica', 'client_name': 'Relatica',
'redirect_uris': '$redirectUrl', 'redirect_uris': redirectUrl,
'scopes': 'read write follow push', 'scopes': 'read write follow push',
'website': 'https://myportal.social', 'website': 'https://myportal.social',
}); });

Wyświetl plik

@ -59,8 +59,8 @@ class Timeline {
void removeTimelineEntry(String id) { void removeTimelineEntry(String id) {
if (_postsById.containsKey(id)) { if (_postsById.containsKey(id)) {
final _post = _postsById.remove(id); final post = _postsById.remove(id);
_posts.remove(_post); _posts.remove(post);
return; return;
} }

Wyświetl plik

@ -146,7 +146,7 @@ class TimelineEntry {
modificationTimestamp: modificationTimestamp:
modificationTimestamp ?? this.modificationTimestamp, modificationTimestamp ?? this.modificationTimestamp,
id: id ?? this.id, id: id ?? this.id,
youReshared: isReshare ?? this.youReshared, youReshared: isReshare ?? youReshared,
visibility: visibility ?? this.visibility, visibility: visibility ?? this.visibility,
parentId: parentId ?? this.parentId, parentId: parentId ?? this.parentId,
externalLink: externalLink ?? this.externalLink, externalLink: externalLink ?? this.externalLink,

Wyświetl plik

@ -72,11 +72,11 @@ final appRouter = GoRouter(
return ScreenPaths.splash; return ScreenPaths.splash;
} }
if (!loggedIn && !allowedLoggedOut.contains(state.location)) { if (!loggedIn && !allowedLoggedOut.contains(state.uri.toString())) {
return ScreenPaths.signin; return ScreenPaths.signin;
} }
if (loggedIn && allowedLoggedOut.contains(state.location)) { if (loggedIn && allowedLoggedOut.contains(state.uri.toString())) {
return ScreenPaths.timelines; return ScreenPaths.timelines;
} }
@ -102,46 +102,46 @@ final appRouter = GoRouter(
GoRoute( GoRoute(
path: 'edit/:id', path: 'edit/:id',
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => NoTransitionPage(
child: FilterEditorScreen(id: state.params['id']!)), child: FilterEditorScreen(id: state.pathParameters['id']!)),
) )
], ],
), ),
GoRoute( GoRoute(
path: ScreenPaths.signin, path: ScreenPaths.signin,
name: ScreenPaths.signin, name: ScreenPaths.signin,
builder: (context, state) => SignInScreen(), builder: (context, state) => const SignInScreen(),
), ),
GoRoute( GoRoute(
path: ScreenPaths.manageProfiles, path: ScreenPaths.manageProfiles,
name: ScreenPaths.manageProfiles, name: ScreenPaths.manageProfiles,
builder: (context, state) => SignInScreen(), builder: (context, state) => const SignInScreen(),
), ),
GoRoute( GoRoute(
path: ScreenPaths.contacts, path: ScreenPaths.contacts,
name: ScreenPaths.contacts, name: ScreenPaths.contacts,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => NoTransitionPage(
name: ScreenPaths.contacts, name: ScreenPaths.contacts,
child: ContactsScreen(), child: const ContactsScreen(),
), ),
), ),
GoRoute( GoRoute(
path: '/connect/:id', path: '/connect/:id',
name: ScreenPaths.connectHandle, name: ScreenPaths.connectHandle,
builder: (context, state) => builder: (context, state) =>
FollowRequestAdjudicationScreen(userId: state.params['id']!), FollowRequestAdjudicationScreen(userId: state.pathParameters['id']!),
), ),
GoRoute( GoRoute(
path: ScreenPaths.timelines, path: ScreenPaths.timelines,
name: ScreenPaths.timelines, name: ScreenPaths.timelines,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => NoTransitionPage(
name: ScreenPaths.timelines, name: ScreenPaths.timelines,
child: HomeScreen(), child: const HomeScreen(),
), ),
), ),
GoRoute( GoRoute(
path: ScreenPaths.messages, path: ScreenPaths.messages,
name: ScreenPaths.messages, name: ScreenPaths.messages,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => const NoTransitionPage(
child: MessagesScreen(), child: MessagesScreen(),
), ),
routes: [ routes: [
@ -157,7 +157,7 @@ final appRouter = GoRouter(
name: ScreenPaths.thread, name: ScreenPaths.thread,
path: ScreenPaths.thread, path: ScreenPaths.thread,
builder: (context, state) => builder: (context, state) =>
MessageThreadScreen(parentThreadId: state.queryParams['uri']!), MessageThreadScreen(parentThreadId: state.uri.queryParameters['uri']!),
), ),
GoRoute( GoRoute(
name: ScreenPaths.groupManagement, name: ScreenPaths.groupManagement,
@ -167,31 +167,31 @@ final appRouter = GoRouter(
GoRoute( GoRoute(
path: 'show/:id', path: 'show/:id',
builder: (context, state) => GroupEditorScreen( builder: (context, state) => GroupEditorScreen(
groupId: state.params['id']!, groupId: state.pathParameters['id']!,
), ),
), ),
GoRoute( GoRoute(
path: 'new', path: 'new',
builder: (context, state) => GroupCreateScreen(), builder: (context, state) => const GroupCreateScreen(),
), ),
GoRoute( GoRoute(
path: 'add_users/:id', path: 'add_users/:id',
builder: (context, state) => builder: (context, state) =>
GroupAddUsersScreen(groupId: state.params['id']!), GroupAddUsersScreen(groupId: state.pathParameters['id']!),
), ),
], ],
), ),
GoRoute( GoRoute(
path: ScreenPaths.settings, path: ScreenPaths.settings,
name: ScreenPaths.settings, name: ScreenPaths.settings,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => const NoTransitionPage(
child: SettingsScreen(), child: SettingsScreen(),
), ),
), ),
GoRoute( GoRoute(
path: ScreenPaths.gallery, path: ScreenPaths.gallery,
name: ScreenPaths.gallery, name: ScreenPaths.gallery,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => const NoTransitionPage(
child: GalleryBrowsersScreen(), child: GalleryBrowsersScreen(),
), ),
routes: [ routes: [
@ -204,8 +204,8 @@ final appRouter = GoRouter(
GoRoute( GoRoute(
path: 'edit/:name/image/:id', path: 'edit/:name/image/:id',
builder: (context, state) => ImageEditorScreen( builder: (context, state) => ImageEditorScreen(
galleryName: state.params['name']!, galleryName: state.pathParameters['name']!,
imageId: state.params['id']!, imageId: state.pathParameters['id']!,
), ),
), ),
], ],
@ -213,19 +213,19 @@ final appRouter = GoRouter(
GoRoute( GoRoute(
path: ScreenPaths.notifications, path: ScreenPaths.notifications,
name: ScreenPaths.notifications, name: ScreenPaths.notifications,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => const NoTransitionPage(
child: NotificationsScreen(), child: NotificationsScreen(),
), ),
), ),
GoRoute( GoRoute(
path: ScreenPaths.splash, path: ScreenPaths.splash,
name: ScreenPaths.splash, name: ScreenPaths.splash,
builder: (context, state) => SplashScreen(), builder: (context, state) => const SplashScreen(),
), ),
GoRoute( GoRoute(
path: '/post', path: '/post',
redirect: (context, state) { redirect: (context, state) {
if (state.location == '/post') { if (state.uri.toString() == '/post') {
return '/post/new'; return '/post/new';
} }
@ -234,29 +234,29 @@ final appRouter = GoRouter(
routes: [ routes: [
GoRoute( GoRoute(
path: 'new', path: 'new',
builder: (context, state) => EditorScreen( builder: (context, state) => const EditorScreen(
forEditing: false, forEditing: false,
), ),
), ),
GoRoute( GoRoute(
path: 'edit/:id', path: 'edit/:id',
builder: (context, state) => EditorScreen( builder: (context, state) => EditorScreen(
id: state.params['id'] ?? 'Not Found', id: state.pathParameters['id'] ?? 'Not Found',
forEditing: true, forEditing: true,
), ),
), ),
GoRoute( GoRoute(
path: 'view/:id/:goto_id', path: 'view/:id/:goto_id',
builder: (context, state) => PostScreen( builder: (context, state) => PostScreen(
id: state.params['id'] ?? 'Not Found', id: state.pathParameters['id'] ?? 'Not Found',
goToId: state.params['goto_id'] ?? 'Not Found', goToId: state.pathParameters['goto_id'] ?? 'Not Found',
), ),
), ),
]), ]),
GoRoute( GoRoute(
path: '/comment', path: '/comment',
redirect: (context, state) { redirect: (context, state) {
if (state.location == '/comment') { if (state.uri.toString() == '/comment') {
return '/comment/new'; return '/comment/new';
} }
@ -266,14 +266,14 @@ final appRouter = GoRouter(
GoRoute( GoRoute(
path: 'new', path: 'new',
builder: (context, state) => EditorScreen( builder: (context, state) => EditorScreen(
parentId: state.queryParams['parent_id'] ?? '', parentId: state.uri.queryParameters['parent_id'] ?? '',
forEditing: false, forEditing: false,
), ),
), ),
GoRoute( GoRoute(
path: 'edit/:id', path: 'edit/:id',
builder: (context, state) => EditorScreen( builder: (context, state) => EditorScreen(
id: state.params['id'] ?? 'Not Found', id: state.pathParameters['id'] ?? 'Not Found',
forEditing: true, forEditing: true,
), ),
), ),
@ -282,13 +282,13 @@ final appRouter = GoRouter(
path: '/user_posts/:id', path: '/user_posts/:id',
name: ScreenPaths.userPosts, name: ScreenPaths.userPosts,
builder: (context, state) => builder: (context, state) =>
UserPostsScreen(userId: state.params['id']!), UserPostsScreen(userId: state.pathParameters['id']!),
), ),
GoRoute( GoRoute(
path: '/likes/:id', path: '/likes/:id',
name: ScreenPaths.likes, name: ScreenPaths.likes,
builder: (context, state) => InteractionsViewerScreen( builder: (context, state) => InteractionsViewerScreen(
statusId: state.params['id']!, statusId: state.pathParameters['id']!,
type: InteractionType.like, type: InteractionType.like,
), ),
), ),
@ -296,7 +296,7 @@ final appRouter = GoRouter(
path: '/reshares/:id', path: '/reshares/:id',
name: ScreenPaths.reshares, name: ScreenPaths.reshares,
builder: (context, state) => InteractionsViewerScreen( builder: (context, state) => InteractionsViewerScreen(
statusId: state.params['id']!, statusId: state.pathParameters['id']!,
type: InteractionType.reshare, type: InteractionType.reshare,
), ),
), ),
@ -304,14 +304,14 @@ final appRouter = GoRouter(
path: '/user_profile/:id', path: '/user_profile/:id',
name: ScreenPaths.userProfile, name: ScreenPaths.userProfile,
builder: (context, state) => builder: (context, state) =>
UserProfileScreen(userId: state.params['id']!), UserProfileScreen(userId: state.pathParameters['id']!),
), ),
GoRoute( GoRoute(
path: ScreenPaths.search, path: ScreenPaths.search,
name: ScreenPaths.search, name: ScreenPaths.search,
pageBuilder: (context, state) => NoTransitionPage( pageBuilder: (context, state) => NoTransitionPage(
name: ScreenPaths.search, name: ScreenPaths.search,
child: SearchScreen(), child: const SearchScreen(),
), ),
), ),
]); ]);

Wyświetl plik

@ -27,7 +27,7 @@ class BlocksScreen extends StatelessWidget {
return ListTile( return ListTile(
onTap: () async { onTap: () async {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': contact.id}); pathParameters: {'id': contact.id});
}, },
leading: ImageControl( leading: ImageControl(
imageUrl: contact.avatarUrl.toString(), imageUrl: contact.avatarUrl.toString(),

Wyświetl plik

@ -13,12 +13,13 @@ import '../controls/status_and_refresh_button.dart';
import '../globals.dart'; import '../globals.dart';
import '../models/connection.dart'; import '../models/connection.dart';
import '../routes.dart'; import '../routes.dart';
import '../services/auth_service.dart';
import '../services/connections_manager.dart'; import '../services/connections_manager.dart';
import '../services/network_status_service.dart'; import '../services/network_status_service.dart';
import '../utils/active_profile_selector.dart'; import '../utils/active_profile_selector.dart';
class ContactsScreen extends StatefulWidget { class ContactsScreen extends StatefulWidget {
const ContactsScreen({super.key});
@override @override
State<ContactsScreen> createState() => _ContactsScreenState(); State<ContactsScreen> createState() => _ContactsScreenState();
} }
@ -30,7 +31,6 @@ class _ContactsScreenState extends State<ContactsScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final nss = getIt<NetworkStatusService>(); final nss = getIt<NetworkStatusService>();
final activeProfile = context.watch<AccountsService>();
final manager = context final manager = context
.watch<ActiveProfileSelector<ConnectionsManager>>() .watch<ActiveProfileSelector<ConnectionsManager>>()
.activeEntry .activeEntry
@ -63,7 +63,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
return ListTile( return ListTile(
onTap: () { onTap: () {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': contact.id}); pathParameters: {'id': contact.id});
}, },
leading: ImageControl( leading: ImageControl(
imageUrl: contact.avatarUrl.toString(), imageUrl: contact.avatarUrl.toString(),
@ -142,7 +142,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
), ),
), ),
), ),
bottomNavigationBar: AppBottomNavBar( bottomNavigationBar: const AppBottomNavBar(
currentButton: NavBarButtons.contacts, currentButton: NavBarButtons.contacts,
), ),
); );

Wyświetl plik

@ -71,6 +71,7 @@ class _EditorScreenState extends State<EditorScreen> {
@override @override
void initState() { void initState() {
super.initState();
if (isComment) { if (isComment) {
final manager = context final manager = context
.read<ActiveProfileSelector<TimelineManager>>() .read<ActiveProfileSelector<TimelineManager>>()
@ -97,7 +98,7 @@ class _EditorScreenState extends State<EditorScreen> {
loaded = false; loaded = false;
final result = await getIt<ActiveProfileSelector<TimelineManager>>() final result = await getIt<ActiveProfileSelector<TimelineManager>>()
.activeEntry .activeEntry
.andThenAsync((manager) async => await manager.getEntryById(widget.id)); .andThenAsync((manager) async => manager.getEntryById(widget.id));
result.match(onSuccess: (entry) { result.match(onSuccess: (entry) {
_logger.fine('Loading status ${widget.id} information into fields'); _logger.fine('Loading status ${widget.id} information into fields');
contentController.text = htmlToSimpleText(entry.body); contentController.text = htmlToSimpleText(entry.body);
@ -227,7 +228,7 @@ class _EditorScreenState extends State<EditorScreen> {
final canSpoilerText = vc.canUseFeature(RelaticaFeatures.postSpoilerText) || final canSpoilerText = vc.canUseFeature(RelaticaFeatures.postSpoilerText) ||
widget.parentId.isNotEmpty; widget.parentId.isNotEmpty;
late final body; late final Widget body;
if (widget.forEditing && !canEdit) { if (widget.forEditing && !canEdit) {
body = Center( body = Center(
@ -479,7 +480,7 @@ class _EditorScreenState extends State<EditorScreen> {
} }
}); });
}, },
icon: Icon(Icons.refresh), icon: const Icon(Icons.refresh),
), ),
], ],
), ),
@ -504,7 +505,7 @@ class _EditorScreenState extends State<EditorScreen> {
linkPreviewData = null; linkPreviewData = null;
}); });
}, },
icon: Icon(Icons.delete), icon: const Icon(Icons.delete),
), ),
), ),
), ),
@ -524,7 +525,7 @@ class _EditorScreenState extends State<EditorScreen> {
); );
} }
final currentImage = Container( final currentImage = SizedBox(
width: width, width: width,
height: height, height: height,
child: child:

Wyświetl plik

@ -50,7 +50,7 @@ class _ExistingImageSelectorScreenState
Navigator.of(context).pop(selectedImages); Navigator.of(context).pop(selectedImages);
}, },
tooltip: 'Attach selected files', tooltip: 'Attach selected files',
icon: Icon(Icons.attach_file), icon: const Icon(Icons.attach_file),
), ),
IconButton( IconButton(
onPressed: selectedImages.isEmpty onPressed: selectedImages.isEmpty
@ -61,7 +61,7 @@ class _ExistingImageSelectorScreenState
}); });
}, },
tooltip: 'Clear Selection', tooltip: 'Clear Selection',
icon: Icon(Icons.remove_circle_outline), icon: const Icon(Icons.remove_circle_outline),
), ),
], ],
), ),
@ -89,11 +89,11 @@ class _ExistingImageSelectorScreenState
} }
Widget buildInfoBody() { Widget buildInfoBody() {
return Center( return const Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: const [Text('Select a gallery')], children: [Text('Select a gallery')],
), ),
); );
} }

Wyświetl plik

@ -169,7 +169,7 @@ class _FollowRequestAdjudicationScreenState
ElevatedButton( ElevatedButton(
onPressed: () => context.pushNamed( onPressed: () => context.pushNamed(
ScreenPaths.userPosts, ScreenPaths.userPosts,
params: {'id': contact.id}, pathParameters: {'id': contact.id},
), ),
child: const Text('Posts')), child: const Text('Posts')),
ElevatedButton( ElevatedButton(

Wyświetl plik

@ -15,6 +15,8 @@ import '../utils/active_profile_selector.dart';
class GalleryBrowsersScreen extends StatelessWidget { class GalleryBrowsersScreen extends StatelessWidget {
static final _logger = Logger('$GalleryBrowsersScreen'); static final _logger = Logger('$GalleryBrowsersScreen');
const GalleryBrowsersScreen({super.key});
String? validNameChecker(String? text) { String? validNameChecker(String? text) {
final newName = text ?? ''; final newName = text ?? '';
if (newName.isEmpty) { if (newName.isEmpty) {
@ -117,11 +119,11 @@ class GalleryBrowsersScreen extends StatelessWidget {
} }
if (galleries.isEmpty) { if (galleries.isEmpty) {
return Center( return const Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: const [ children: [
Text('Loading galleries'), Text('Loading galleries'),
VerticalPadding(), VerticalPadding(),
CircularProgressIndicator(), CircularProgressIndicator(),

Wyświetl plik

@ -96,11 +96,11 @@ class _GalleryScreenBody extends StatelessWidget {
final images = imageResult.value; final images = imageResult.value;
final attachments = images.map((i) => i.toMediaAttachment()).toList(); final attachments = images.map((i) => i.toMediaAttachment()).toList();
if (images.isEmpty && service.loaded) { if (images.isEmpty && service.loaded) {
return Center( return const Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: const [ children: [
Text('No images'), Text('No images'),
], ],
), ),
@ -108,11 +108,11 @@ class _GalleryScreenBody extends StatelessWidget {
} }
if (images.isEmpty) { if (images.isEmpty) {
return Center( return const Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: const [ children: [
Text('Loading images'), Text('Loading images'),
], ],
), ),

Wyświetl plik

@ -12,7 +12,6 @@ import '../models/connection.dart';
import '../models/exec_error.dart'; import '../models/exec_error.dart';
import '../models/group_data.dart'; import '../models/group_data.dart';
import '../routes.dart'; import '../routes.dart';
import '../services/auth_service.dart';
import '../services/connections_manager.dart'; import '../services/connections_manager.dart';
import '../services/network_status_service.dart'; import '../services/network_status_service.dart';
import '../utils/active_profile_selector.dart'; import '../utils/active_profile_selector.dart';
@ -63,7 +62,6 @@ class _GroupAddUsersScreenState extends State<GroupAddUsersScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
_logger.finer('Build'); _logger.finer('Build');
final nss = getIt<NetworkStatusService>(); final nss = getIt<NetworkStatusService>();
final activeProfile = context.watch<AccountsService>();
final manager = context final manager = context
.watch<ActiveProfileSelector<ConnectionsManager>>() .watch<ActiveProfileSelector<ConnectionsManager>>()
.activeEntry .activeEntry
@ -102,7 +100,7 @@ class _GroupAddUsersScreenState extends State<GroupAddUsersScreen> {
return ListTile( return ListTile(
onTap: () { onTap: () {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': contact.id}); pathParameters: {'id': contact.id});
}, },
title: Text( title: Text(
'${contact.name} (${contact.handle})', '${contact.name} (${contact.handle})',

Wyświetl plik

@ -9,7 +9,7 @@ import '../utils/active_profile_selector.dart';
import '../utils/snackbar_builder.dart'; import '../utils/snackbar_builder.dart';
class GroupCreateScreen extends StatefulWidget { class GroupCreateScreen extends StatefulWidget {
GroupCreateScreen({super.key}); const GroupCreateScreen({super.key});
@override @override
State<GroupCreateScreen> createState() => _GroupCreateScreenState(); State<GroupCreateScreen> createState() => _GroupCreateScreenState();

Wyświetl plik

@ -243,7 +243,7 @@ class _GroupEditorScreenState extends State<GroupEditorScreen> {
return ListTile( return ListTile(
onTap: () { onTap: () {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': m.id}); pathParameters: {'id': m.id});
}, },
title: Text( title: Text(
'${m.name} (${m.handle})', '${m.name} (${m.handle})',

Wyświetl plik

@ -168,7 +168,7 @@ class _HomeScreenState extends State<HomeScreen> {
onPressed: () { onPressed: () {
context.push('/post/new'); context.push('/post/new');
}, },
child: Icon(Icons.add), child: const Icon(Icons.add),
)); ));
} }
} }

Wyświetl plik

@ -80,7 +80,7 @@ class InteractionsViewerScreen extends StatelessWidget {
}); });
if (context.mounted) { if (context.mounted) {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': connection.id}); pathParameters: {'id': connection.id});
} }
}, },
leading: ImageControl( leading: ImageControl(
@ -88,7 +88,7 @@ class InteractionsViewerScreen extends StatelessWidget {
iconOverride: const Icon(Icons.person), iconOverride: const Icon(Icons.person),
width: 32.0, width: 32.0,
onTap: () => context.pushNamed(ScreenPaths.userProfile, onTap: () => context.pushNamed(ScreenPaths.userProfile,
params: {'id': connection.id}), pathParameters: {'id': connection.id}),
), ),
title: Text('${connection.name} (${connection.handle})'), title: Text('${connection.name} (${connection.handle})'),
); );

Wyświetl plik

@ -221,7 +221,7 @@ class _MediaViewerScreenState extends State<MediaViewerScreen> {
text: attachment.description, text: attachment.description,
message: 'Image description copied to clipboard'); message: 'Image description copied to clipboard');
}, },
icon: Icon(Icons.copy), icon: const Icon(Icons.copy),
), ),
], ],
), ),

Wyświetl plik

@ -14,6 +14,8 @@ import '../utils/active_profile_selector.dart';
import '../utils/dateutils.dart'; import '../utils/dateutils.dart';
class MessagesScreen extends StatelessWidget { class MessagesScreen extends StatelessWidget {
const MessagesScreen({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final service = context final service = context
@ -32,7 +34,7 @@ class MessagesScreen extends StatelessWidget {
onPressed: () { onPressed: () {
context.push('/messages/new_thread'); context.push('/messages/new_thread');
}, },
icon: Icon(Icons.add), icon: const Icon(Icons.add),
) )
]), ]),
body: RefreshIndicator( body: RefreshIndicator(
@ -61,7 +63,7 @@ class MessagesScreen extends StatelessWidget {
return ListTile( return ListTile(
onTap: () => context.pushNamed( onTap: () => context.pushNamed(
ScreenPaths.thread, ScreenPaths.thread,
queryParams: {'uri': thread.parentUri}, queryParameters: {'uri': thread.parentUri},
), ),
leading: ImageControl( leading: ImageControl(
imageUrl: thread.participants.first.avatarUrl.toString(), imageUrl: thread.participants.first.avatarUrl.toString(),

Wyświetl plik

@ -16,6 +16,8 @@ class MessagesNewThread extends StatelessWidget {
final replyController = TextEditingController(); final replyController = TextEditingController();
final focusNode = FocusNode(); final focusNode = FocusNode();
MessagesNewThread({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(

Wyświetl plik

@ -52,9 +52,9 @@ class NotificationsScreen extends StatelessWidget {
update(manager); update(manager);
return; return;
}, },
child: Center( child: const Center(
child: Column( child: Column(
children: const [ children: [
Center(child: Text('No notifications')), Center(child: Text('No notifications')),
], ],
)), )),
@ -114,9 +114,9 @@ class NotificationsScreen extends StatelessWidget {
}, onError: (error) { }, onError: (error) {
title = 'Notifications'; title = 'Notifications';
actions = []; actions = [];
body = Center( body = const Center(
child: Column( child: Column(
children: const [ children: [
Center(child: Text('Error getting notifications')), Center(child: Text('Error getting notifications')),
], ],
)); ));
@ -130,7 +130,7 @@ class NotificationsScreen extends StatelessWidget {
withDrawer: true, withDrawer: true,
actions: actions, actions: actions,
), ),
drawer: StandardAppDrawer(), drawer: const StandardAppDrawer(),
body: body, body: body,
bottomNavigationBar: const AppBottomNavBar( bottomNavigationBar: const AppBottomNavBar(
currentButton: NavBarButtons.notifications, currentButton: NavBarButtons.notifications,

Wyświetl plik

@ -26,6 +26,8 @@ import '../utils/active_profile_selector.dart';
import '../utils/snackbar_builder.dart'; import '../utils/snackbar_builder.dart';
class SearchScreen extends StatefulWidget { class SearchScreen extends StatefulWidget {
const SearchScreen({super.key});
@override @override
State<SearchScreen> createState() => _SearchScreenState(); State<SearchScreen> createState() => _SearchScreenState();
} }
@ -40,7 +42,7 @@ class _SearchScreenState extends State<SearchScreen> {
var searchResult = SearchResults.empty(); var searchResult = SearchResults.empty();
PagingData genNextPageData() { PagingData genNextPageData() {
late final offset; late final int offset;
switch (searchType) { switch (searchType) {
case SearchTypes.hashTag: case SearchTypes.hashTag:
offset = searchResult.hashtags.length; offset = searchResult.hashtags.length;
@ -110,7 +112,7 @@ class _SearchScreenState extends State<SearchScreen> {
} }
return Scaffold( return Scaffold(
drawer: StandardAppDrawer(skipPopDismiss: true), drawer: const StandardAppDrawer(skipPopDismiss: true),
body: SafeArea( body: SafeArea(
child: RefreshIndicator( child: RefreshIndicator(
onRefresh: () async { onRefresh: () async {
@ -147,7 +149,7 @@ class _SearchScreenState extends State<SearchScreen> {
alignLabelWithHint: true, alignLabelWithHint: true,
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).backgroundColor, color: Theme.of(context).colorScheme.background,
), ),
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),
@ -312,15 +314,15 @@ class _SearchScreenState extends State<SearchScreen> {
}); });
if (context.mounted) { if (context.mounted) {
context.pushNamed(ScreenPaths.userProfile, context.pushNamed(ScreenPaths.userProfile,
params: {'id': connection.id}); pathParameters: {'id': connection.id});
} }
}, },
leading: ImageControl( leading: ImageControl(
imageUrl: connection.avatarUrl.toString(), imageUrl: connection.avatarUrl.toString(),
iconOverride: const Icon(Icons.person), iconOverride: const Icon(Icons.person),
width: 32.0, width: 32.0,
onTap: () => context onTap: () => context.pushNamed(ScreenPaths.userProfile,
.pushNamed(ScreenPaths.userProfile, params: {'id': connection.id}), pathParameters: {'id': connection.id}),
), ),
title: Text('${connection.name} (${connection.handle})'), title: Text('${connection.name} (${connection.handle})'),
); );

Wyświetl plik

@ -11,6 +11,8 @@ import '../services/setting_service.dart';
import '../utils/theme_mode_extensions.dart'; import '../utils/theme_mode_extensions.dart';
class SettingsScreen extends StatelessWidget { class SettingsScreen extends StatelessWidget {
const SettingsScreen({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final settings = context.watch<SettingsService>(); final settings = context.watch<SettingsService>();

Wyświetl plik

@ -14,6 +14,8 @@ import '../services/auth_service.dart';
import '../utils/snackbar_builder.dart'; import '../utils/snackbar_builder.dart';
class SignInScreen extends StatefulWidget { class SignInScreen extends StatefulWidget {
const SignInScreen({super.key});
@override @override
State<SignInScreen> createState() => _SignInScreenState(); State<SignInScreen> createState() => _SignInScreenState();
} }
@ -146,7 +148,7 @@ class _SignInScreenState extends State<SignInScreen> {
hintText: 'Server Name (friendica.example.com)', hintText: 'Server Name (friendica.example.com)',
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).backgroundColor, color: Theme.of(context).colorScheme.background,
), ),
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),
@ -180,7 +182,7 @@ class _SignInScreenState extends State<SignInScreen> {
hintText: 'Username (user@example.com)', hintText: 'Username (user@example.com)',
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).backgroundColor, color: Theme.of(context).colorScheme.background,
), ),
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),
@ -207,7 +209,7 @@ class _SignInScreenState extends State<SignInScreen> {
hintText: 'Password', hintText: 'Password',
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: Theme.of(context).backgroundColor, color: Theme.of(context).colorScheme.background,
), ),
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),
@ -368,6 +370,8 @@ class _SignInScreenState extends State<SignInScreen> {
return; return;
} }
print('Sign in credentials: ${creds.toJson()}');
final result = await getIt<AccountsService>().signIn(creds); final result = await getIt<AccountsService>().signIn(creds);
if (mounted && result.isFailure) { if (mounted && result.isFailure) {
buildSnackbar(context, 'Error signing in: ${result.error}'); buildSnackbar(context, 'Error signing in: ${result.error}');

Wyświetl plik

@ -6,6 +6,8 @@ import '../globals.dart';
import '../services/auth_service.dart'; import '../services/auth_service.dart';
class SplashScreen extends StatelessWidget { class SplashScreen extends StatelessWidget {
const SplashScreen({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(

Wyświetl plik

@ -63,7 +63,7 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
children: [ children: [
LoginAwareCachedNetworkImage( LoginAwareCachedNetworkImage(
imageUrl: profile.avatarUrl.toString()), imageUrl: profile.avatarUrl.toString()),
Row( const Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [], children: [],
@ -91,7 +91,7 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
ElevatedButton( ElevatedButton(
onPressed: () => context.pushNamed( onPressed: () => context.pushNamed(
ScreenPaths.userPosts, ScreenPaths.userPosts,
params: {'id': profile.id}, pathParameters: {'id': profile.id},
), ),
child: const Text('Posts')), child: const Text('Posts')),
ElevatedButton( ElevatedButton(
@ -127,7 +127,7 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
}); });
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text('Profile'), title: const Text('Profile'),
), ),
body: Padding( body: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),

Wyświetl plik

@ -33,7 +33,7 @@ extension TimelineEntryFriendicaExtensions on TimelineEntry {
final authorId = json['user']['id_str']; final authorId = json['user']['id_str'];
final title = json['friendica_title'] ?? ''; final title = json['friendica_title'] ?? '';
final externalLink = json['external_url'] ?? ''; final externalLink = json['external_url'] ?? '';
final actualLocationData = LocationData(); const actualLocationData = LocationData();
final modificationTimestamp = timestamp; final modificationTimestamp = timestamp;
final backdatedTimestamp = timestamp; final backdatedTimestamp = timestamp;
final mediaAttachments = (json['attachments'] as List<dynamic>? ?? []) final mediaAttachments = (json['attachments'] as List<dynamic>? ?? [])

Wyświetl plik

@ -8,7 +8,7 @@ import 'connection_mastodon_extensions.dart';
extension FollowRequestMastodonExtension on FollowRequest { extension FollowRequestMastodonExtension on FollowRequest {
static FollowRequest fromJson(Map<String, dynamic> json) { static FollowRequest fromJson(Map<String, dynamic> json) {
final connection = ConnectionMastodonExtensions.fromJson(json); final connection = ConnectionMastodonExtensions.fromJson(json);
final id = json['id'] ?? Uuid().v4(); final id = json['id'] ?? const Uuid().v4();
final int timestamp = json.containsKey('created_at') final int timestamp = json.containsKey('created_at')
? OffsetDateTimeUtils.epochSecTimeFromTimeZoneString(json['created_at']) ? OffsetDateTimeUtils.epochSecTimeFromTimeZoneString(json['created_at'])
.fold( .fold(

Wyświetl plik

@ -144,11 +144,11 @@ class EntryManagerService extends ChangeNotifier {
return item; return item;
}).andThenSuccessAsync((item) async { }).andThenSuccessAsync((item) async {
if (inReplyToId.isNotEmpty) { if (inReplyToId.isNotEmpty) {
late final rootPostId; late final String rootPostId;
if (_postNodes.containsKey(inReplyToId)) { if (_postNodes.containsKey(inReplyToId)) {
rootPostId = inReplyToId; rootPostId = inReplyToId;
} else { } else {
rootPostId = _parentPostIds[inReplyToId]; rootPostId = _parentPostIds[inReplyToId]!;
} }
await refreshStatusChain(rootPostId); await refreshStatusChain(rootPostId);
} }
@ -234,11 +234,11 @@ class EntryManagerService extends ChangeNotifier {
}).andThenSuccessAsync((item) async { }).andThenSuccessAsync((item) async {
final inReplyToId = item.parentId; final inReplyToId = item.parentId;
if (inReplyToId.isNotEmpty) { if (inReplyToId.isNotEmpty) {
late final rootPostId; late final String rootPostId;
if (_postNodes.containsKey(inReplyToId)) { if (_postNodes.containsKey(inReplyToId)) {
rootPostId = inReplyToId; rootPostId = inReplyToId;
} else { } else {
rootPostId = _parentPostIds[inReplyToId]; rootPostId = _parentPostIds[inReplyToId]!;
} }
await refreshStatusChain(rootPostId); await refreshStatusChain(rootPostId);
} }

Wyświetl plik

@ -103,7 +103,7 @@ class NotificationsManager extends ChangeNotifier {
}) async { }) async {
final (_, highestId) = final (_, highestId) =
unread.isNotEmpty ? calcLowHigh(unread) : calcLowHigh(read); unread.isNotEmpty ? calcLowHigh(unread) : calcLowHigh(read);
final pm = await _buildPageManager( final pm = _buildPageManager(
profile, profile,
true, true,
initialPages: [ initialPages: [

Wyświetl plik

@ -11,7 +11,7 @@ class ActiveProfileSelector<T> extends ChangeNotifier {
final T Function(Profile p)? _entryBuilder; final T Function(Profile p)? _entryBuilder;
bool _subscribeAdded = false; final bool _subscribeAdded = false;
ActiveProfileSelector(T Function(Profile p)? entryBuilder) ActiveProfileSelector(T Function(Profile p)? entryBuilder)
: _entryBuilder = entryBuilder; : _entryBuilder = entryBuilder;

Wyświetl plik

@ -4,7 +4,7 @@ class PrettyJsonEncoder {
late JsonEncoder encoder; late JsonEncoder encoder;
PrettyJsonEncoder() { PrettyJsonEncoder() {
encoder = JsonEncoder.withIndent('\t'); encoder = const JsonEncoder.withIndent('\t');
} }
String convert(Object json) => encoder.convert(json); String convert(Object json) => encoder.convert(json);

Wyświetl plik

@ -7,6 +7,7 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <desktop_window/desktop_window_plugin.h> #include <desktop_window/desktop_window_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h> #include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h> #include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
#include <media_kit_video/media_kit_video_plugin.h> #include <media_kit_video/media_kit_video_plugin.h>
@ -18,6 +19,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) desktop_window_registrar = g_autoptr(FlPluginRegistrar) desktop_window_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopWindowPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopWindowPlugin");
desktop_window_plugin_register_with_registrar(desktop_window_registrar); desktop_window_plugin_register_with_registrar(desktop_window_registrar);
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);

Wyświetl plik

@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
desktop_window desktop_window
file_selector_linux
flutter_secure_storage_linux flutter_secure_storage_linux
media_kit_libs_linux media_kit_libs_linux
media_kit_video media_kit_video

Wyświetl plik

@ -7,28 +7,38 @@ import Foundation
import desktop_window import desktop_window
import device_info_plus import device_info_plus
import file_selector_macos
import flutter_secure_storage_macos import flutter_secure_storage_macos
import flutter_web_auth_2 import flutter_web_auth_2
import media_kit_libs_macos_video import media_kit_libs_macos_video
import media_kit_video import media_kit_video
import objectbox_flutter_libs import objectbox_flutter_libs
import package_info_plus
import path_provider_foundation import path_provider_foundation
import screen_brightness_macos
import shared_preferences_foundation import shared_preferences_foundation
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
import video_player_avfoundation
import wakelock_plus
import window_to_front import window_to_front
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DesktopWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWindowPlugin")) DesktopWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWindowPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin")) FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin")) MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin")) MediaKitVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitVideoPlugin"))
ObjectboxFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "ObjectboxFlutterLibsPlugin")) ObjectboxFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "ObjectboxFlutterLibsPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin")) WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin"))
} }

Wyświetl plik

@ -1,4 +1,4 @@
platform :osx, '11.0' platform :osx, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

Wyświetl plik

@ -3,9 +3,11 @@ PODS:
- FlutterMacOS - FlutterMacOS
- device_info_plus (0.0.1): - device_info_plus (0.0.1):
- FlutterMacOS - FlutterMacOS
- file_selector_macos (0.0.1):
- FlutterMacOS
- flutter_secure_storage_macos (6.1.1): - flutter_secure_storage_macos (6.1.1):
- FlutterMacOS - FlutterMacOS
- flutter_web_auth_2 (1.1.1): - flutter_web_auth_2 (3.0.0):
- FlutterMacOS - FlutterMacOS
- FlutterMacOS (1.0.0) - FlutterMacOS (1.0.0)
- FMDB (2.7.5): - FMDB (2.7.5):
@ -17,13 +19,17 @@ PODS:
- FlutterMacOS - FlutterMacOS
- media_kit_video (0.0.1): - media_kit_video (0.0.1):
- FlutterMacOS - FlutterMacOS
- ObjectBox (1.8.1) - ObjectBox (1.9.0)
- objectbox_flutter_libs (0.0.1): - objectbox_flutter_libs (0.0.1):
- FlutterMacOS - FlutterMacOS
- ObjectBox (= 1.8.1) - ObjectBox (= 1.9.0)
- package_info_plus (0.0.1):
- FlutterMacOS
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- screen_brightness_macos (0.1.0):
- FlutterMacOS
- shared_preferences_foundation (0.0.1): - shared_preferences_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
@ -32,12 +38,18 @@ PODS:
- FMDB (>= 2.7.5) - FMDB (>= 2.7.5)
- url_launcher_macos (0.0.1): - url_launcher_macos (0.0.1):
- FlutterMacOS - FlutterMacOS
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
- wakelock_plus (0.0.1):
- FlutterMacOS
- window_to_front (0.0.1): - window_to_front (0.0.1):
- FlutterMacOS - FlutterMacOS
DEPENDENCIES: DEPENDENCIES:
- desktop_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_window/macos`) - desktop_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_window/macos`)
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
- flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`) - flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`)
- FlutterMacOS (from `Flutter/ephemeral`) - FlutterMacOS (from `Flutter/ephemeral`)
@ -45,10 +57,14 @@ DEPENDENCIES:
- media_kit_native_event_loop (from `Flutter/ephemeral/.symlinks/plugins/media_kit_native_event_loop/macos`) - media_kit_native_event_loop (from `Flutter/ephemeral/.symlinks/plugins/media_kit_native_event_loop/macos`)
- media_kit_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos`) - media_kit_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos`)
- objectbox_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos`) - objectbox_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- screen_brightness_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`) - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
- video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`)
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
- window_to_front (from `Flutter/ephemeral/.symlinks/plugins/window_to_front/macos`) - window_to_front (from `Flutter/ephemeral/.symlinks/plugins/window_to_front/macos`)
SPEC REPOS: SPEC REPOS:
@ -61,6 +77,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/desktop_window/macos :path: Flutter/ephemeral/.symlinks/plugins/desktop_window/macos
device_info_plus: device_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
file_selector_macos:
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
flutter_secure_storage_macos: flutter_secure_storage_macos:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
flutter_web_auth_2: flutter_web_auth_2:
@ -75,35 +93,48 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos :path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos
objectbox_flutter_libs: objectbox_flutter_libs:
:path: Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos :path: Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation: path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
screen_brightness_macos:
:path: Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos
shared_preferences_foundation: shared_preferences_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
sqflite: sqflite:
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos :path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos
url_launcher_macos: url_launcher_macos:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
video_player_avfoundation:
:path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin
wakelock_plus:
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
window_to_front: window_to_front:
:path: Flutter/ephemeral/.symlinks/plugins/window_to_front/macos :path: Flutter/ephemeral/.symlinks/plugins/window_to_front/macos
SPEC CHECKSUMS: SPEC CHECKSUMS:
desktop_window: fb7c4f12c1129f947ac482296b6f14059d57a3c3 desktop_window: fb7c4f12c1129f947ac482296b6f14059d57a3c3
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9
flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea
flutter_web_auth_2: 6695649132b6c71ea17700703761c0d18fdb8cf6 flutter_web_auth_2: 2e1dc2d2139973e4723c5286ce247dd590390d70
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
media_kit_libs_macos_video: 0a4a5bf21533cba968c0833f1b59e9af8b5847f1 media_kit_libs_macos_video: b3e2bbec2eef97c285f2b1baa7963c67c753fb82
media_kit_native_event_loop: 9a1b256cfb11adcaebd13a2969c617720c3187e0 media_kit_native_event_loop: 81fd5b45192b72f8b5b69eaf5b540f45777eb8d5
media_kit_video: 1e311a3dfe41f276935f95518b51a0c3ff72114f media_kit_video: c75b07f14d59706c775778e4dd47dd027de8d1e5
ObjectBox: a7900d5335218cd437cbc080b7ccc38a5211f7b4 ObjectBox: e7ff611291a0663380e0736b46786bcd077294ff
objectbox_flutter_libs: f89ab4878f0f764a49077cfaa59030be69ae1d7e objectbox_flutter_libs: 32997857c213cbcc6f9b25ffc73e1e3c34ea3c8e
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
screen_brightness_macos: 2d6d3af2165592d9a55ffcd95b7550970e41ebda
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451 url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
video_player_avfoundation: 8563f13d8fc8b2c29dc2d09e60b660e4e8128837
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
window_to_front: 4cdc24ddd8461ad1a55fa06286d6a79d8b29e8d8 window_to_front: 4cdc24ddd8461ad1a55fa06286d6a79d8b29e8d8
PODFILE CHECKSUM: 8d40c19d3cbdb380d870685c3a564c989f1efa52 PODFILE CHECKSUM: 137ddf7b4dbe5a83427ebf04ae8dea674cfd87fa
COCOAPODS: 1.12.0 COCOAPODS: 1.14.2

Wyświetl plik

@ -204,7 +204,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0920; LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300; LastUpgradeCheck = 1430;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
33CC10EC2044A3C60003C045 = { 33CC10EC2044A3C60003C045 = {
@ -407,7 +407,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx; SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;
@ -436,7 +436,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
}; };
@ -497,7 +497,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx; SDKROOT = macosx;
@ -545,7 +545,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx; SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;
@ -574,7 +574,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@ -602,7 +602,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
}; };

Wyświetl plik

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1300" LastUpgradeVersion = "1430"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

Plik diff jest za duży Load Diff

Wyświetl plik

@ -15,34 +15,29 @@ dependencies:
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
carousel_slider: ^4.2.1 carousel_slider: ^4.2.1
desktop_window: ^0.4.0 desktop_window: ^0.4.0
device_info_plus: ^8.0.0 device_info_plus: ^9.1.0
device_preview: ^1.1.0 device_preview: ^1.1.0
file_picker: ^5.2.4 file_picker: ^6.0.0
flutter_dotenv: ^5.0.2 flutter_dotenv: ^5.0.2
flutter_file_dialog: ^3.0.0 flutter_file_dialog: ^3.0.0
flutter_secure_storage: ^8.0.0 flutter_secure_storage: ^9.0.0
flutter_web_auth_2: ^2.1.2 flutter_web_auth_2: ^3.0.3
flutter_widget_from_html_core: ^0.10.0 flutter_widget_from_html_core: ^0.14.6
get_it: ^7.2.0 get_it: ^7.2.0
get_it_mixin: ^4.1.1 get_it_mixin: ^4.1.1
go_router: ^6.5.0 go_router: ^12.0.1
html: ^0.15.2 html: ^0.15.2
image: ^4.0.15 image: ^4.0.15
image_picker: ^0.8.6 image_picker: ^1.0.4
logging: ^1.1.0 logging: ^1.1.0
markdown: ^7.0.1 markdown: ^7.0.1
media_kit: ^0.0.5 # Primary package. media_kit: ^1.1.10 # Primary package.
media_kit_video: ^0.0.6 # For video rendering. media_kit_libs_video: ^1.0.4 # Native video dependencies.
media_kit_native_event_loop: ^1.0.3 # Support for higher number of concurrent instances & better performance. media_kit_video: ^1.2.4 # For video rendering.
media_kit_libs_windows_video: ^1.0.2 # Windows package for video native libraries. multi_trigger_autocomplete: ^1.0.0
media_kit_libs_android_video: ^1.0.0 # Android package for video native libraries.
media_kit_libs_macos_video: ^1.0.4 # macOS package for video native libraries.
media_kit_libs_ios_video: ^1.0.4 # iOS package for video native libraries.
media_kit_libs_linux: ^1.0.2 # GNU/Linux dependency package. metadata_fetch: ^0.4.1
multi_trigger_autocomplete: ^0.1.1
network_to_file_image: ^4.0.1 network_to_file_image: ^4.0.1
objectbox: ^2.0.0 objectbox: ^2.3.1
objectbox_flutter_libs: ^2.0.0 objectbox_flutter_libs: ^2.3.1
path: ^1.8.2 path: ^1.8.2
path_provider: ^2.0.11 path_provider: ^2.0.11
provider: ^6.0.4 provider: ^6.0.4
@ -51,12 +46,12 @@ dependencies:
url: https://gitlab.com/HankG/dart-result-monad.git url: https://gitlab.com/HankG/dart-result-monad.git
scrollable_positioned_list: ^0.3.5 scrollable_positioned_list: ^0.3.5
shared_preferences: ^2.0.15 shared_preferences: ^2.0.15
sqlite3: ^1.9.1 sqlite3: ^2.1.0
stack_trace: ^1.11.0 stack_trace: ^1.11.0
string_validator: ^0.3.0 string_validator: ^1.0.2
time_machine: ^0.9.17 time_machine: ^0.9.17
url_launcher: ^6.1.6 url_launcher: ^6.1.6
uuid: ^3.0.6 uuid: ^4.1.0
video_player: ^2.4.10 video_player: ^2.4.10
flutter_svg: ^2.0.5 flutter_svg: ^2.0.5
@ -64,7 +59,7 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^2.0.0 flutter_lints: ^3.0.0
build_runner: ^2.3.3 build_runner: ^2.3.3
objectbox_generator: ^2.0.0 objectbox_generator: ^2.0.0

Wyświetl plik

@ -14,19 +14,25 @@ void main() async {
final pm = _buildPagesManager(); final pm = _buildPagesManager();
final numbers = <int>[]; final numbers = <int>[];
final initial = await pm.initialize(10); final initial = await pm.initialize(10);
initial.value.data.forEach((e) => numbers.add(e.id)); for (var e in initial.value.data) {
numbers.add(e.id);
}
var current = initial.value; var current = initial.value;
while (current.next != null) { while (current.next != null) {
final result = await pm.nextWithResult(current); final result = await pm.nextWithResult(current);
current = result.value; current = result.value;
result.value.data.forEach((e) => numbers.add(e.id)); for (var e in result.value.data) {
numbers.add(e.id);
}
} }
current = initial.value; current = initial.value;
while (current.previous != null) { while (current.previous != null) {
final result = await pm.previousWithResult(current); final result = await pm.previousWithResult(current);
current = result.value; current = result.value;
result.value.data.forEach((e) => numbers.add(e.id)); for (var e in result.value.data) {
numbers.add(e.id);
}
} }
numbers.sort(); numbers.sort();
final expected = elements.map((e) => e.id).toList(); final expected = elements.map((e) => e.id).toList();
@ -40,7 +46,9 @@ void main() async {
final pm = _buildPagesManager(); final pm = _buildPagesManager();
final numbers = <int>[]; final numbers = <int>[];
final initial = await pm.initialize(10); final initial = await pm.initialize(10);
initial.value.data.reversed.forEach((e) => numbers.add(e.id)); for (var e in initial.value.data.reversed) {
numbers.add(e.id);
}
var moreWork = true; var moreWork = true;
while (moreWork) { while (moreWork) {
final nextFromEnd = await pm.nextFromEnd(); final nextFromEnd = await pm.nextFromEnd();

Wyświetl plik

@ -7,16 +7,20 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <desktop_window/desktop_window_plugin.h> #include <desktop_window/desktop_window_plugin.h>
#include <file_selector_windows/file_selector_windows.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h> #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h> #include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
#include <media_kit_video/media_kit_video_plugin_c_api.h> #include <media_kit_video/media_kit_video_plugin_c_api.h>
#include <objectbox_flutter_libs/objectbox_flutter_libs_plugin.h> #include <objectbox_flutter_libs/objectbox_flutter_libs_plugin.h>
#include <screen_brightness_windows/screen_brightness_windows_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
#include <window_to_front/window_to_front_plugin.h> #include <window_to_front/window_to_front_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
DesktopWindowPluginRegisterWithRegistrar( DesktopWindowPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DesktopWindowPlugin")); registry->GetRegistrarForPlugin("DesktopWindowPlugin"));
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FlutterSecureStorageWindowsPluginRegisterWithRegistrar( FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar( MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
@ -25,6 +29,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi")); registry->GetRegistrarForPlugin("MediaKitVideoPluginCApi"));
ObjectboxFlutterLibsPluginRegisterWithRegistrar( ObjectboxFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ObjectboxFlutterLibsPlugin")); registry->GetRegistrarForPlugin("ObjectboxFlutterLibsPlugin"));
ScreenBrightnessWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
UrlLauncherWindowsRegisterWithRegistrar( UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows")); registry->GetRegistrarForPlugin("UrlLauncherWindows"));
WindowToFrontPluginRegisterWithRegistrar( WindowToFrontPluginRegisterWithRegistrar(

Wyświetl plik

@ -4,10 +4,12 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
desktop_window desktop_window
file_selector_windows
flutter_secure_storage_windows flutter_secure_storage_windows
media_kit_libs_windows_video media_kit_libs_windows_video
media_kit_video media_kit_video
objectbox_flutter_libs objectbox_flutter_libs
screen_brightness_windows
url_launcher_windows url_launcher_windows
window_to_front window_to_front
) )