mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Ready to implement the list of notifications
This commit is contained in:
19
lib/lists/abstract_list.dart
Normal file
19
lib/lists/abstract_list.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'dart:collection';
|
||||
|
||||
/// Abstract list
|
||||
///
|
||||
/// @author Pierre HUBERT
|
||||
|
||||
class AbstractList<E> extends ListBase<E> {
|
||||
final _list = List<E>();
|
||||
|
||||
int get length => _list.length;
|
||||
|
||||
set length(int l) => _list.length = l;
|
||||
|
||||
@override
|
||||
E operator [](int index) => _list[index];
|
||||
|
||||
@override
|
||||
void operator []=(int index, E value) => _list[index] = value;
|
||||
}
|
8
lib/lists/notifications_list.dart
Normal file
8
lib/lists/notifications_list.dart
Normal file
@ -0,0 +1,8 @@
|
||||
import 'package:comunic/lists/abstract_list.dart';
|
||||
import 'package:comunic/models/notification.dart';
|
||||
|
||||
/// Notifications list
|
||||
///
|
||||
/// @author Pierre HUBERT
|
||||
|
||||
class NotificationsList extends AbstractList<Notification> {}
|
Reference in New Issue
Block a user