- MainMenu - ChatItem (Widget) - ChatFolder (Widget) - ChatFolders (Widget) - ColorTheme
32 lines
856 B
Dart
32 lines
856 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
class ChatFolder extends StatelessWidget{
|
|
Icon ?icon;
|
|
Icon iconn = Icon(Icons.folder, size: 50,);
|
|
String name;
|
|
ChatFolder({super.key, this.icon, required this.name}){
|
|
icon ??= Icon(Icons.folder);
|
|
iconn = Icon(icon?.icon, size: 50,);
|
|
|
|
}
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.fromLTRB(5, 2, 5, 2),
|
|
child: TextButton(
|
|
onPressed: () => print(name),
|
|
style: ButtonStyle(foregroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onSurface)),
|
|
child:
|
|
Row(
|
|
children: [
|
|
?icon,
|
|
SizedBox(width: 2,),
|
|
Text(name, style: TextStyle(fontSize: 18),)
|
|
],
|
|
),
|
|
)
|
|
);
|
|
}
|
|
} |