further refactoring, conversion to stream
This commit is contained in:
19
lib/widgets/generic/elements/card_content.dart
Normal file
19
lib/widgets/generic/elements/card_content.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CardContent extends StatelessWidget {
|
||||
const CardContent({super.key, required this.content});
|
||||
|
||||
final String content;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
contentPadding: const EdgeInsets.fromLTRB(15, 0, 15, 15),
|
||||
title: Text(
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontWeight: FontWeight.w300),
|
||||
content),
|
||||
);
|
||||
}
|
||||
}
|
24
lib/widgets/generic/elements/card_image.dart
Normal file
24
lib/widgets/generic/elements/card_image.dart
Normal file
@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CardImage extends StatelessWidget {
|
||||
const CardImage({super.key, required this.image});
|
||||
|
||||
final ImageProvider<Object> image;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
|
||||
child: Container(
|
||||
width: 60,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: image,
|
||||
// color: Colors.blue,
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.elliptical(8, 8)),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
16
lib/widgets/generic/elements/generic_progress_indicator.dart
Normal file
16
lib/widgets/generic/elements/generic_progress_indicator.dart
Normal file
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GenericProgressIndicator extends StatelessWidget {
|
||||
const GenericProgressIndicator({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
height: 50.0,
|
||||
width: 50.0,
|
||||
child: CircularProgressIndicator(),
|
||||
));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user