Move to Flutter 3.47, use the improvements that come with this (#64)
Reviewed-on: #64
This commit is contained in:
parent
01b13b4764
commit
077044ec19
157 changed files with 1366 additions and 1457 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||
import "package:nexus/controllers/emoji.dart";
|
||||
import "package:nexus/controllers/init_complete.dart";
|
||||
|
|
@ -8,9 +8,7 @@ import "package:nexus/widgets/sidebar.dart";
|
|||
import "package:nexus/widgets/room_chat.dart";
|
||||
import "package:nexus/widgets/loading.dart";
|
||||
|
||||
class ChatPage extends ConsumerWidget {
|
||||
const ChatPage({super.key});
|
||||
|
||||
class const ChatPage({super.key}) extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) => LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import "package:app_links/app_links.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:flutter_hooks/flutter_hooks.dart";
|
||||
import "package:flutter_svg/flutter_svg.dart";
|
||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||
|
|
@ -13,9 +13,7 @@ import "package:nexus/pages/settings.dart";
|
|||
import "package:nexus/widgets/appbar.dart";
|
||||
import "package:nexus/widgets/divider_text.dart";
|
||||
|
||||
class SelectServerPage extends HookConsumerWidget {
|
||||
const SelectServerPage({super.key});
|
||||
|
||||
class const SelectServerPage({super.key}) extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = Theme.of(context);
|
||||
|
|
@ -181,23 +179,20 @@ class SelectServerPage extends HookConsumerWidget {
|
|||
...(<Homeserver>[
|
||||
.new(
|
||||
name: "Matrix.org",
|
||||
description:
|
||||
"The Matrix.org Foundation offers the matrix.org homeserver as an easy entry point for anyone wanting to try out Matrix.",
|
||||
description: "The Matrix.org Foundation offers the matrix.org homeserver as an easy entry point for anyone wanting to try out Matrix.",
|
||||
url: .https("matrix.org"),
|
||||
iconUrl:
|
||||
"https://raw.githubusercontent.com/element-hq/logos/refs/heads/master/matrix/matrix-favicon${Theme.brightnessOf(context) == Brightness.dark ? "-white" : ""}.png",
|
||||
),
|
||||
.new(
|
||||
name: "Federated Nexus",
|
||||
description:
|
||||
"Federated Nexus is a community resource hosting multiple FOSS (especially federated) services, including Matrix and Forgejo. By the same developers who made Nexus client.",
|
||||
description: "Federated Nexus is a community resource hosting multiple FOSS (especially federated) services, including Matrix and Forgejo. By the same developers who made Nexus client.",
|
||||
url: .https("federated.nexus"),
|
||||
iconUrl: "https://federated.nexus/images/icon.png",
|
||||
),
|
||||
.new(
|
||||
name: "Unredacted",
|
||||
description:
|
||||
"Unredacted is a 501(c)(3) non-profit organization that builds Internet infrastructure and services to help people evade censorship and protect their right to privacy.",
|
||||
description: "Unredacted is a 501(c)(3) non-profit organization that builds Internet infrastructure and services to help people evade censorship and protect their right to privacy.",
|
||||
url: .https("unredacted.org", "services/si/matrix"),
|
||||
iconUrl: "https://unredacted.org/favicon.ico",
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import "package:collection/collection.dart";
|
||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:flutter_hooks/flutter_hooks.dart";
|
||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||
import "package:m3e_card_list/m3e_card_list.dart";
|
||||
|
|
@ -13,9 +13,7 @@ import "package:nexus/widgets/divider_text.dart";
|
|||
import "package:nexus/widgets/highlight_wrapper.dart";
|
||||
import "package:super_sliver_list/super_sliver_list.dart";
|
||||
|
||||
class SettingsPage extends ConsumerWidget {
|
||||
const SettingsPage({super.key});
|
||||
|
||||
class const SettingsPage({super.key}) extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) => LayoutBuilder(
|
||||
builder: (_, constraints) => HookBuilder(
|
||||
|
|
@ -142,12 +140,12 @@ class SettingsPage extends ConsumerWidget {
|
|||
vertical: 8,
|
||||
),
|
||||
margin: .symmetric(horizontal: 12),
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.primaryContainer,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primaryContainer,
|
||||
itemCount: categories.length,
|
||||
onTap: (index) =>
|
||||
Navigator.of(context).push(
|
||||
onTap: (index) => Navigator.of(context)
|
||||
.push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
SettingsCategoryPage(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import "dart:async";
|
||||
|
||||
import "package:collection/collection.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:flutter_hooks/flutter_hooks.dart";
|
||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||
import "package:nexus/controllers/settings_sections.dart";
|
||||
|
|
@ -9,11 +9,11 @@ import "package:nexus/helpers/extensions/better_when.dart";
|
|||
import "package:nexus/widgets/highlight_wrapper.dart";
|
||||
import "package:super_sliver_list/super_sliver_list.dart";
|
||||
|
||||
class SettingsCategoryPage extends HookConsumerWidget {
|
||||
final int index;
|
||||
final int? initialHighlight;
|
||||
const SettingsCategoryPage(this.index, {this.initialHighlight, super.key});
|
||||
|
||||
class const SettingsCategoryPage(
|
||||
final int index, {
|
||||
final int? initialHighlight,
|
||||
super.key,
|
||||
}) extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final highlight = useState<int?>(initialHighlight);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:material_ui/material_ui.dart";
|
||||
import "package:flutter_hooks/flutter_hooks.dart";
|
||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||
import "package:nexus/controllers/client.dart";
|
||||
|
|
@ -6,9 +6,7 @@ import "package:nexus/pages/settings.dart";
|
|||
import "package:nexus/widgets/appbar.dart";
|
||||
import "package:nexus/helpers/required_validator_helper.dart";
|
||||
|
||||
class VerifyPage extends HookConsumerWidget {
|
||||
const VerifyPage({super.key});
|
||||
|
||||
class const VerifyPage({super.key}) extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final passphraseController = useTextEditingController();
|
||||
|
|
|
|||
Loading…
Reference in a new issue