mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-26 16:05:29 -04:00
home layout
This commit is contained in:
parent
f754f7d5ed
commit
ca6b00e021
45 changed files with 2168 additions and 561 deletions
37
lib/components/profile.dart
Normal file
37
lib/components/profile.dart
Normal file
|
@ -0,0 +1,37 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class ProfileWidget extends ConsumerWidget {
|
||||
const ProfileWidget({
|
||||
required this.name,
|
||||
this.title,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final String name;
|
||||
final String? title;
|
||||
|
||||
@override
|
||||
// ignore: prefer_expression_function_bodies
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
// final logins = ref.watch(loginsProvider);
|
||||
|
||||
return ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxHeight: 300),
|
||||
child: Column(children: [
|
||||
Text('Profile', style: Theme.of(context).textTheme.headlineMedium),
|
||||
Text(name, style: Theme.of(context).textTheme.bodyMedium),
|
||||
if (title != null && title!.isNotEmpty)
|
||||
Text(title!, style: Theme.of(context).textTheme.bodySmall),
|
||||
]));
|
||||
}
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
super.debugFillProperties(properties);
|
||||
properties
|
||||
..add(StringProperty('name', name))
|
||||
..add(StringProperty('title', title));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue