This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
d235461
commit 861dbcf
Showing
40 changed files
with
1,905 additions
and
359 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// ignore: public_member_api_docs | ||
import 'package:utils/utils.dart'; | ||
|
||
// ignore: public_member_api_docs | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
library nextcloud_talk; | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:nextcloud_talk/src/nextcloud_talk_events.dart'; | ||
import 'package:nextcloud_talk/src/nextcloud_talk_keys.dart'; | ||
import 'package:nextcloud_talk/src/nextcloud_talk_loader.dart'; | ||
import 'package:utils/utils.dart'; | ||
import 'package:widgets/widgets.dart'; | ||
|
||
import 'src/nextcloud_talk_info_card.dart'; | ||
import 'src/nextcloud_talk_localizations.dart'; | ||
import 'src/nextcloud_talk_page.dart'; | ||
|
||
/// The Nextcloud Talk feature | ||
class NextcloudTalkFeature implements Feature { | ||
@override | ||
String get name => NextcloudTalkLocalizations.name; | ||
|
||
@override | ||
String get featureKey => NextcloudTalkKeys.nextcloudTalk; | ||
|
||
@override | ||
List<String> dependsOn(BuildContext context) => null; | ||
|
||
@override | ||
NextcloudTalkLoader loader = NextcloudTalkLoader(); | ||
|
||
@override | ||
NotificationsHandler get notificationsHandler => null; | ||
|
||
@override | ||
TagsHandler get tagsHandler => null; | ||
|
||
@override | ||
InfoCard getInfoCard(DateTime date, double maxHeight) => | ||
NextcloudTalkInfoCard( | ||
date: date, | ||
maxHeight: maxHeight, | ||
); | ||
|
||
@override | ||
Widget getPage() => NextcloudTalkPage(key: ValueKey(featureKey)); | ||
|
||
@override | ||
NextcloudTalkWidget getFeatureWidget(Widget child) => NextcloudTalkWidget( | ||
feature: this, | ||
key: ValueKey(featureKey), | ||
child: child, | ||
); | ||
|
||
@override | ||
DateTime getHomePageDate() => null; | ||
|
||
@override | ||
Duration durationToHomePageDateUpdate() => null; | ||
|
||
@override | ||
Subscription subscribeToDataUpdates( | ||
EventBus eventBus, Function(ChangedEvent p1) callback) => | ||
eventBus.respond<NextcloudTalkUpdateEvent>(callback); | ||
} | ||
|
||
// ignore: public_member_api_docs | ||
class NextcloudTalkWidget extends FeatureWidget<NextcloudTalkFeature> { | ||
// ignore: public_member_api_docs | ||
const NextcloudTalkWidget({ | ||
@required Widget child, | ||
@required NextcloudTalkFeature feature, | ||
Key key, | ||
}) : super( | ||
child: child, | ||
feature: feature, | ||
key: key, | ||
); | ||
|
||
/// Find the closest [NextcloudTalkWidget] from ancestor tree. | ||
static NextcloudTalkWidget of(BuildContext context) => | ||
context.dependOnInheritedWidgetOfExactType<NextcloudTalkWidget>(); | ||
} |
Oops, something went wrong.