Skip to content

Commit

Permalink
chore: Upgrade to latest sdk and dep versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 2, 2024
1 parent d13ebc8 commit a06f2fe
Show file tree
Hide file tree
Showing 17 changed files with 215 additions and 253 deletions.
6 changes: 0 additions & 6 deletions .heroku/entrypoint.sh

This file was deleted.

1 change: 0 additions & 1 deletion .heroku/keys

This file was deleted.

85 changes: 0 additions & 85 deletions .heroku/wasm.cpp

This file was deleted.

4 changes: 4 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ include: package:flutter_lints/flutter.yaml
linter:
rules:
prefer_single_quotes: true

analyzer:
exclude:
- '**/*.g.dart'
4 changes: 0 additions & 4 deletions heroku.yml

This file was deleted.

5 changes: 2 additions & 3 deletions lib/add_contact_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import 'package:flutter/material.dart';
import 'strings.dart';

class AddContactPage extends StatefulWidget {
const AddContactPage({Key? key, required this.onAddContact})
: super(key: key);
const AddContactPage({super.key, required this.onAddContact});

final Function(String, String) onAddContact;

Expand Down Expand Up @@ -45,7 +44,7 @@ class _AddContactPageState extends State<AddContactPage> {
validator: (value) {
value ??= '';
if (value.length != 76) {
return Strings.toxIdLengthError + ' (${value.length}/76)';
return '${Strings.toxIdLengthError} (${value.length}/76)';
}
return null;
},
Expand Down
4 changes: 2 additions & 2 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import 'db/database.dart';
import 'strings.dart';

class App extends StatelessWidget {
const App({Key? key, required this.database}) : super(key: key);

final Database database;

const App({super.key, required this.database});

@override
Widget build(BuildContext context) {
return MaterialApp(
Expand Down
4 changes: 2 additions & 2 deletions lib/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import 'strings.dart';

class ChatPage extends StatefulWidget {
const ChatPage({
Key? key,
super.key,
required this.contact,
required this.messages,
required this.onSendMessage,
}) : super(key: key);
});

final Stream<Contact> contact;
final Stream<List<Message>> messages;
Expand Down
25 changes: 11 additions & 14 deletions lib/contact_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import 'settings.dart';
import 'strings.dart';

class ContactListItem extends StatelessWidget {
const ContactListItem({Key? key, required this.contact, required this.onTap})
: super(key: key);
const ContactListItem(
{super.key, required this.contact, required this.onTap});

final Contact contact;
final Function(Contact) onTap;
Expand All @@ -28,8 +28,7 @@ class ContactListItem extends StatelessWidget {
}

class ContactListPage extends StatefulWidget {
ContactListPage({Key? key, required this.title, required this.database})
: super(key: key);
ContactListPage({super.key, required this.title, required this.database});

final String title;
final Database database;
Expand Down Expand Up @@ -115,16 +114,14 @@ class _ContactListPageState extends State<ContactListPage> {
);
},
),
defaultTargetPlatform == TargetPlatform.android
? ListTile(
leading: const Icon(Icons.close),
title: const Text(Strings.menuQuit),
onTap: () {
SystemChannels.platform
.invokeMethod('SystemNavigator.pop');
},
)
: const SizedBox.shrink(),
if (defaultTargetPlatform == TargetPlatform.android)
ListTile(
leading: const Icon(Icons.close),
title: const Text(Strings.menuQuit),
onTap: () {
SystemChannels.platform.invokeMethod('SystemNavigator.pop');
},
)
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/db/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Messages extends Table {

@DriftDatabase(tables: [Contacts, Messages])
class Database extends _$Database {
Database(QueryExecutor e) : super(e);
Database(super.e);

@override
int get schemaVersion => 2;
Expand Down
8 changes: 4 additions & 4 deletions lib/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'strings.dart';
class UserProfilePage extends StatefulWidget {
final AppState appState;

const UserProfilePage({Key? key, required this.appState}) : super(key: key);
const UserProfilePage({super.key, required this.appState});

@override
State<UserProfilePage> createState() => _UserProfilePageState();
Expand Down Expand Up @@ -114,15 +114,15 @@ class _UserProfilePageState extends State<UserProfilePage> {
),
),
ElevatedButton(
child: _applyButtonPressed
? const Text(Strings.applied)
: const Text(Strings.applyChanges),
style: ElevatedButton.styleFrom(
backgroundColor:
_applyButtonPressed ? Colors.green : Colors.blue,
foregroundColor: Colors.white,
),
onPressed: () => _onValidate(),
child: _applyButtonPressed
? const Text(Strings.applied)
: const Text(Strings.applyChanges),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'strings.dart';

class SettingsPage extends StatefulWidget {
const SettingsPage({Key? key}) : super(key: key);
const SettingsPage({super.key});

@override
State<SettingsPage> createState() => _SettingsPageState();
Expand Down
Loading

0 comments on commit a06f2fe

Please sign in to comment.