mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-04 06:38:27 +08:00
App Drawer: Implement the share button
It's very basic, but it's a decent start.
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:journal/state_container.dart';
|
import 'package:journal/state_container.dart';
|
||||||
|
import 'package:share/share.dart';
|
||||||
|
|
||||||
class AppDrawer extends StatelessWidget {
|
class AppDrawer extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
@ -46,8 +47,7 @@ class AppDrawer extends StatelessWidget {
|
|||||||
title: Text('Share App'),
|
title: Text('Share App'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
// Update the state of the app
|
Share.share('Checkout GitJournal https://gitjournal.io/');
|
||||||
// ...
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
@ -345,6 +345,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
share:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: share
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.0+1"
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -17,6 +17,7 @@ dependencies:
|
|||||||
package_info: ^0.3.2+1
|
package_info: ^0.3.2+1
|
||||||
http: ^0.12.0+1
|
http: ^0.12.0+1
|
||||||
badges: ^0.0.6
|
badges: ^0.0.6
|
||||||
|
share: ^0.6.0+1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_launcher_icons: "^0.7.0"
|
flutter_launcher_icons: "^0.7.0"
|
||||||
|
Reference in New Issue
Block a user