feat: Add statistics card on landing page

This commit is contained in:
Anton Stubenbord
2023-08-01 18:09:14 +02:00
parent f3e660e91d
commit 53a01ae775
21 changed files with 469 additions and 78 deletions

View 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],
),
),
);
}
}