2023-07-26 14:20:29 -04:00
|
|
|
import 'package:awesome_extensions/awesome_extensions.dart';
|
|
|
|
import 'package:circular_profile_avatar/circular_profile_avatar.dart';
|
|
|
|
import 'package:flutter/foundation.dart';
|
2023-07-22 23:29:10 -04:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'package:window_manager/window_manager.dart';
|
|
|
|
|
2023-07-23 01:06:42 -04:00
|
|
|
import '../entities/local_account.dart';
|
2023-07-22 23:29:10 -04:00
|
|
|
import '../providers/logins.dart';
|
|
|
|
|
|
|
|
class AccountBubble extends ConsumerWidget {
|
2023-07-26 14:20:29 -04:00
|
|
|
const AccountBubble({required this.account, super.key});
|
2023-07-23 01:06:42 -04:00
|
|
|
final LocalAccount account;
|
2023-07-22 23:29:10 -04:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
|
|
windowManager.setTitleBarStyle(TitleBarStyle.normal);
|
|
|
|
final logins = ref.watch(loginsProvider);
|
|
|
|
|
2023-07-23 01:06:42 -04:00
|
|
|
return ConstrainedBox(
|
|
|
|
constraints: const BoxConstraints(maxHeight: 300),
|
|
|
|
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
|
|
|
Expanded(
|
|
|
|
flex: 4,
|
2023-07-26 14:20:29 -04:00
|
|
|
child: CircularProfileAvatar('',
|
2023-07-23 01:06:42 -04:00
|
|
|
child: Container(color: Theme.of(context).disabledColor))),
|
2023-07-26 14:20:29 -04:00
|
|
|
const Expanded(child: Text('Placeholder'))
|
2023-07-23 01:06:42 -04:00
|
|
|
]));
|
2023-07-22 23:29:10 -04:00
|
|
|
}
|
2023-07-26 14:20:29 -04:00
|
|
|
|
|
|
|
@override
|
|
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
|
|
super.debugFillProperties(properties);
|
|
|
|
properties.add(DiagnosticsProperty<LocalAccount>('account', account));
|
|
|
|
}
|
2023-07-22 23:29:10 -04:00
|
|
|
}
|
2023-07-23 23:13:21 -04:00
|
|
|
|
|
|
|
class AddAccountBubble extends ConsumerWidget {
|
|
|
|
const AddAccountBubble({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
|
|
windowManager.setTitleBarStyle(TitleBarStyle.normal);
|
|
|
|
final logins = ref.watch(loginsProvider);
|
|
|
|
|
|
|
|
return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
2023-07-26 14:20:29 -04:00
|
|
|
CircularProfileAvatar('',
|
2023-07-23 23:13:21 -04:00
|
|
|
borderWidth: 4,
|
|
|
|
borderColor: Theme.of(context).unselectedWidgetColor,
|
|
|
|
child: Container(
|
|
|
|
color: Colors.blue, child: const Icon(Icons.add, size: 50))),
|
2023-07-26 14:20:29 -04:00
|
|
|
const Text('Add Account').paddingLTRB(0, 4, 0, 0)
|
2023-07-23 23:13:21 -04:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|