mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Adds skeleton widget for displayign notifications
This commit is contained in:
parent
a3597c5d61
commit
b8857f2dbe
2 changed files with 66 additions and 7 deletions
57
lib/widget/notifications.dart
Normal file
57
lib/widget/notifications.dart
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:inventree/widget/refreshable_state.dart';
|
||||
|
||||
class NotificationWidget extends StatefulWidget {
|
||||
|
||||
@override
|
||||
_NotificationState createState() => _NotificationState();
|
||||
|
||||
}
|
||||
|
||||
|
||||
class _NotificationState extends RefreshableState<NotificationWidget> {
|
||||
|
||||
_NotificationState() : super();
|
||||
|
||||
@override
|
||||
AppBar? buildAppBar(BuildContext context) {
|
||||
// No app bar for the notification widget
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> request (BuildContext context) async {
|
||||
print("requesting notifications!");
|
||||
}
|
||||
|
||||
List<Widget> renderNotifications(BuildContext context) {
|
||||
|
||||
List<Widget> tiles = [];
|
||||
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("Not"),
|
||||
subtitle: Text("subtitle yatyayaya"),
|
||||
)
|
||||
);
|
||||
|
||||
return tiles;
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
Widget getBody(BuildContext context) {
|
||||
return Center(
|
||||
child: ListView(
|
||||
children: ListTile.divideTiles(
|
||||
context: context,
|
||||
tiles: renderNotifications(context),
|
||||
).toList()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue