mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-02 06:16:16 -04:00
lint work
This commit is contained in:
parent
9e4008214d
commit
6e8725f569
43 changed files with 257 additions and 332 deletions
|
@ -1,19 +1,17 @@
|
|||
import 'package:awesome_extensions/awesome_extensions.dart';
|
||||
import 'package:circular_profile_avatar/circular_profile_avatar.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
import 'package:circular_profile_avatar/circular_profile_avatar.dart';
|
||||
import 'package:badges/badges.dart';
|
||||
import 'package:awesome_extensions/awesome_extensions.dart';
|
||||
|
||||
import '../entities/local_account.dart';
|
||||
import '../providers/logins.dart';
|
||||
|
||||
class AccountBubble extends ConsumerWidget {
|
||||
const AccountBubble({required this.account, super.key});
|
||||
final LocalAccount account;
|
||||
|
||||
const AccountBubble({super.key, required this.account});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
windowManager.setTitleBarStyle(TitleBarStyle.normal);
|
||||
|
@ -24,11 +22,17 @@ class AccountBubble extends ConsumerWidget {
|
|||
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: CircularProfileAvatar("",
|
||||
child: CircularProfileAvatar('',
|
||||
child: Container(color: Theme.of(context).disabledColor))),
|
||||
Expanded(flex: 1, child: Text("Placeholder"))
|
||||
const Expanded(child: Text('Placeholder'))
|
||||
]));
|
||||
}
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
super.debugFillProperties(properties);
|
||||
properties.add(DiagnosticsProperty<LocalAccount>('account', account));
|
||||
}
|
||||
}
|
||||
|
||||
class AddAccountBubble extends ConsumerWidget {
|
||||
|
@ -40,12 +44,12 @@ class AddAccountBubble extends ConsumerWidget {
|
|||
final logins = ref.watch(loginsProvider);
|
||||
|
||||
return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
CircularProfileAvatar("",
|
||||
CircularProfileAvatar('',
|
||||
borderWidth: 4,
|
||||
borderColor: Theme.of(context).unselectedWidgetColor,
|
||||
child: Container(
|
||||
color: Colors.blue, child: const Icon(Icons.add, size: 50))),
|
||||
const Text("Add Account").paddingLTRB(0, 4, 0, 0)
|
||||
const Text('Add Account').paddingLTRB(0, 4, 0, 0)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,15 +5,13 @@ class Chat extends ConsumerWidget {
|
|||
const Chat({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text("Chat")),
|
||||
body: Center(
|
||||
Widget build(BuildContext context, WidgetRef ref) => Scaffold(
|
||||
appBar: AppBar(title: const Text('Chat')),
|
||||
body: const Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Text("Home Page"),
|
||||
Text('Home Page'),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// ref.watch(authNotifierProvider.notifier).logout();
|
||||
|
@ -24,5 +22,4 @@ class Chat extends ConsumerWidget {
|
|||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,15 +5,12 @@ class ChatIndex extends ConsumerWidget {
|
|||
const ChatIndex({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
appBar: null,
|
||||
Widget build(BuildContext context, WidgetRef ref) => const Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Text("Contacts Page"),
|
||||
Text('Contacts Page'),
|
||||
// ElevatedButton(
|
||||
// onPressed: () async {
|
||||
// ref.watch(authNotifierProvider.notifier).login(
|
||||
|
@ -27,5 +24,4 @@ class ChatIndex extends ConsumerWidget {
|
|||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:flutter_translate/flutter_translate.dart';
|
|||
|
||||
class DefaultAppBar extends AppBar {
|
||||
DefaultAppBar(BuildContext context,
|
||||
{super.key, required super.title, Widget? leading, List<Widget>? actions})
|
||||
{required super.title, super.key, Widget? leading, List<Widget>? actions})
|
||||
: super(
|
||||
leading: leading ??
|
||||
Container(
|
||||
|
@ -12,7 +12,7 @@ class DefaultAppBar extends AppBar {
|
|||
decoration: BoxDecoration(
|
||||
color: Colors.black.withAlpha(32),
|
||||
shape: BoxShape.circle),
|
||||
child: SvgPicture.asset("assets/images/vlogo.svg",
|
||||
child: SvgPicture.asset('assets/images/vlogo.svg',
|
||||
height: 48)),
|
||||
actions: (actions ?? <Widget>[])
|
||||
..add(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue