mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-15 08:12:28 -06:00
feat: Add statistics card on landing page
This commit is contained in:
33
lib/features/landing/view/widgets/expansion_card.dart
Normal file
33
lib/features/landing/view/widgets/expansion_card.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:paperless_mobile/extensions/flutter_extensions.dart';
|
||||
|
||||
class ExpansionCard extends StatelessWidget {
|
||||
final Widget title;
|
||||
final Widget content;
|
||||
|
||||
const ExpansionCard({super.key, required this.title, required this.content});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: EdgeInsets.all(16),
|
||||
child: Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
dividerColor: Colors.transparent,
|
||||
expansionTileTheme: ExpansionTileThemeData(
|
||||
shape: Theme.of(context).cardTheme.shape,
|
||||
collapsedShape: Theme.of(context).cardTheme.shape,
|
||||
),
|
||||
listTileTheme: ListTileThemeData(
|
||||
shape: Theme.of(context).cardTheme.shape,
|
||||
),
|
||||
),
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: true,
|
||||
title: title,
|
||||
children: [content],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user