[READ-ONLY] Mirror of https://github.com/probablykasper/notifier. Android app for scheduling notifications
android app flutter notifications
0

Configure Feed

Select the types of activity you want to include in your feed.

Weekly repeating lets you select weekdays

Kasper (Jun 3, 2019, 11:00 PM +0200) 7ab3fd7f f196bc5d

+24 -1
+2 -1
lib/models/notification_dialog.dart
··· 1 1 import 'package:scoped_model/scoped_model.dart'; 2 2 3 3 class NotificationDialogModel extends Model { 4 - Map<String, Object> item = { 4 + Map<String, dynamic> item = { 5 5 'title': '', 6 6 'description': '', 7 7 'repeat': 'never', 8 8 'repeatEvery': 1, 9 + 'weekdays': [false,false,false,false,false,false,false], 9 10 'noSwipeAway': false, 10 11 'date': DateTime.now().millisecondsSinceEpoch, 11 12 };
+22
lib/pages/notification_dialog.dart
··· 277 277 ], 278 278 ), 279 279 ), 280 + Container( 281 + padding: EdgeInsets.symmetric(horizontal: 24), 282 + child: (() { 283 + if (model.item['repeat'] == 'weekly') { 284 + List<Checkbox> checkboxes = []; 285 + model.item['weekdays'].asMap().forEach((index, value) { 286 + checkboxes.add( 287 + Checkbox( 288 + value: value, 289 + onChanged: (bool newValue) { 290 + model.item['weekdays'][index] = newValue; 291 + model.rebuild(); 292 + }, 293 + ), 294 + ); 295 + }); 296 + return Row(children: checkboxes); 297 + } else { 298 + return Container(); 299 + } 300 + })(), 301 + ) 280 302 ], 281 303 ), 282 304 ),