Skip to content

Commit

Permalink
Use super.key syntax introduced in Dart 2.19, updated xcodeproj
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Mar 5, 2024
1 parent b402826 commit 6a50f07
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 32 deletions.
5 changes: 4 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1520;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -353,6 +353,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -437,6 +438,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -493,6 +495,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1520"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion lib/asr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Widget _buildASREngineList(BuildContext context) {
}

class ASRSelectionRoute extends StatelessWidget {
const ASRSelectionRoute({Key? key}) : super(key: key);
const ASRSelectionRoute({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class SessionButtonWidget extends StatelessWidget {
final EmblaSession? session;
final void Function() onTap;

const SessionButtonWidget(this.context, this.session, this.onTap, {Key? key}) : super(key: key);
const SessionButtonWidget(this.context, this.session, this.onTap, {super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ ListView _buildVersionInfoWidgetList(BuildContext context) {

/// Route for displaying app and device information
class VersionRoute extends StatelessWidget {
const VersionRoute({Key? key}) : super(key: key);
const VersionRoute({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void main() async {
}

class EmblaApp extends StatelessWidget {
const EmblaApp({Key? key}) : super(key: key);
const EmblaApp({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ListView _buildMenu(BuildContext context) {

/// Menu route shown when user presses the hamburger menu in session route.
class MenuRoute extends StatelessWidget {
const MenuRoute({Key? key}) : super(key: key);
const MenuRoute({super.key});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ BuildContext? sessionContext;

// Main widget for session view
class SessionRoute extends StatefulWidget {
const SessionRoute({Key? key}) : super(key: key);
const SessionRoute({super.key});

@override
State<StatefulWidget> createState() => SessionRouteState();
Expand Down Expand Up @@ -524,7 +524,7 @@ class SessionTextAreaWidget extends StatelessWidget {
final String text;
final String? imageURL;

const SessionTextAreaWidget(this.text, this.imageURL, {Key? key}) : super(key: key);
const SessionTextAreaWidget(this.text, this.imageURL, {super.key});

@override
Widget build(BuildContext context) {
Expand Down
35 changes: 14 additions & 21 deletions lib/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class SettingsSwitchWidget extends StatefulWidget {
final void Function()? onChanged; // Callback

const SettingsSwitchWidget(
{Key? key, required this.label, required this.prefKey, this.enabled = true, this.onChanged})
: super(key: key);
{super.key, required this.label, required this.prefKey, this.enabled = true, this.onChanged});

@override
SettingsSwitchWidgetState createState() => SettingsSwitchWidgetState();
Expand Down Expand Up @@ -108,8 +107,7 @@ class SettingsPrivacySwitchWidget extends StatefulWidget {
final void Function()? onChanged; // Callback

const SettingsPrivacySwitchWidget(
{Key? key, required this.label, required this.prefKey, this.onChanged})
: super(key: key);
{super.key, required this.label, required this.prefKey, this.onChanged});

@override
SettingsPrivacySwitchWidgetState createState() => SettingsPrivacySwitchWidgetState();
Expand Down Expand Up @@ -182,14 +180,13 @@ class SettingsSliderWidget extends StatefulWidget {
final void Function(double)? onChangeEnd;

const SettingsSliderWidget(
{Key? key,
{super.key,
required this.label,
required this.prefKey,
required this.minValue,
required this.maxValue,
required this.stepSize,
this.onChangeEnd})
: super(key: key);
this.onChangeEnd});

@override
SettingsSliderWidgetState createState() => SettingsSliderWidgetState();
Expand Down Expand Up @@ -244,12 +241,11 @@ class SettingsButtonPromptWidget extends StatelessWidget {
final void Function() handler;

const SettingsButtonPromptWidget(
{Key? key,
{super.key,
required this.label,
required this.alertText,
required this.buttonTitle,
required this.handler})
: super(key: key);
required this.handler});

Future<void> _showPromptDialog(BuildContext context) async {
String? r = await showAlertDialog(
Expand Down Expand Up @@ -286,8 +282,7 @@ class SettingsServerSelectionWidget extends StatefulWidget {
final List<List<String>> items;
final String prefKey;

const SettingsServerSelectionWidget({Key? key, required this.items, required this.prefKey})
: super(key: key);
const SettingsServerSelectionWidget({super.key, required this.items, required this.prefKey});

@override
SettingsServerSelectionWidgetState createState() => SettingsServerSelectionWidgetState();
Expand Down Expand Up @@ -370,8 +365,7 @@ class SettingsLabelValueWidget extends StatelessWidget {
final String value;
final dynamic onTapRoute;

const SettingsLabelValueWidget(this.label, this.value, {this.onTapRoute, Key? key})
: super(key: key);
const SettingsLabelValueWidget(this.label, this.value, {this.onTapRoute, super.key});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -409,7 +403,7 @@ class SettingsLabelValueWidget extends StatelessWidget {
class SettingsFullTextLabelWidget extends StatelessWidget {
final String label;

const SettingsFullTextLabelWidget(this.label, {Key? key}) : super(key: key);
const SettingsFullTextLabelWidget(this.label, {super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -424,7 +418,7 @@ class SettingsFullTextLabelWidget extends StatelessWidget {
class SettingsAsyncFullTextLabelWidget extends StatelessWidget {
final Future<String> future;

const SettingsAsyncFullTextLabelWidget(this.future, {Key? key}) : super(key: key);
const SettingsAsyncFullTextLabelWidget(this.future, {super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -446,8 +440,7 @@ class SettingsAsyncLabelValueWidget extends StatelessWidget {
final Future<String> future;
final Widget? onTapRoute;

const SettingsAsyncLabelValueWidget(this.label, this.future, {this.onTapRoute, Key? key})
: super(key: key);
const SettingsAsyncLabelValueWidget(this.label, this.future, {this.onTapRoute, super.key});

@override
Widget build(BuildContext context) {
Expand All @@ -466,7 +459,7 @@ class SettingsAsyncLabelValueWidget extends StatelessWidget {
class SettingsVoiceSelectionWidget extends StatefulWidget {
final String label;

const SettingsVoiceSelectionWidget({Key? key, required this.label}) : super(key: key);
const SettingsVoiceSelectionWidget({super.key, required this.label});

@override
SettingsVoiceSelectionWidgetState createState() => SettingsVoiceSelectionWidgetState();
Expand Down Expand Up @@ -503,7 +496,7 @@ class SettingsVoiceSelectionWidgetState extends State<SettingsVoiceSelectionWidg
class SettingsASRSelectionWidget extends StatefulWidget {
final String label;

const SettingsASRSelectionWidget({Key? key, required this.label}) : super(key: key);
const SettingsASRSelectionWidget({super.key, required this.label});

@override
SettingsASRSelectionWidgetState createState() => SettingsASRSelectionWidgetState();
Expand Down Expand Up @@ -640,7 +633,7 @@ List<Widget> _settings(BuildContext context, void Function() refreshCallback) {

/// The main settings route
class SettingsRoute extends StatefulWidget {
const SettingsRoute({Key? key}) : super(key: key);
const SettingsRoute({super.key});

@override
State<StatefulWidget> createState() => SettingsRouteState();
Expand Down
2 changes: 1 addition & 1 deletion lib/voices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Widget _buildVoiceList(BuildContext context) {
}

class VoiceSelectionRoute extends StatelessWidget {
const VoiceSelectionRoute({Key? key}) : super(key: key);
const VoiceSelectionRoute({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Future<void> preloadHTMLDocuments() async {
class WebViewRoute extends StatefulWidget {
final String initialURL;

const WebViewRoute({Key? key, required this.initialURL}) : super(key: key);
const WebViewRoute({super.key, required this.initialURL});

@override
WebViewRouteState createState() => WebViewRouteState();
Expand Down

0 comments on commit 6a50f07

Please sign in to comment.