-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31818ec
commit 765fe97
Showing
9 changed files
with
49 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
lib/sharezone_widgets/lib/src/creation_editing_dialogs/creation_editing_dialogs.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export 'course_tile_base.dart'; | ||
export 'description_field_base.dart'; | ||
export 'markdown_support.dart'; | ||
export 'send_notification_base.dart'; |
37 changes: 37 additions & 0 deletions
37
lib/sharezone_widgets/lib/src/creation_editing_dialogs/send_notification_base.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:sharezone_widgets/sharezone_widgets.dart'; | ||
|
||
class SendNotificationBase extends StatelessWidget { | ||
const SendNotificationBase({ | ||
super.key, | ||
required this.title, | ||
required this.sendNotification, | ||
required this.onChanged, | ||
this.listTileKey, | ||
this.switchKey, | ||
this.description, | ||
}); | ||
|
||
final String title; | ||
final String? description; | ||
final bool sendNotification; | ||
final Function(bool) onChanged; | ||
final Key? listTileKey; | ||
final Key? switchKey; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ListTileWithDescription( | ||
key: listTileKey, | ||
leading: const Icon(Icons.notifications_active), | ||
title: Text(title), | ||
trailing: Switch.adaptive( | ||
key: switchKey, | ||
onChanged: onChanged, | ||
value: sendNotification, | ||
), | ||
onTap: () => onChanged(!sendNotification), | ||
description: description != null ? Text(description!) : null, | ||
); | ||
} | ||
} |
File renamed without changes.