mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-04 14:49:44 +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:journal/state_container.dart';
|
||||
import 'package:share/share.dart';
|
||||
|
||||
class AppDrawer extends StatelessWidget {
|
||||
@override
|
||||
@ -46,8 +47,7 @@ class AppDrawer extends StatelessWidget {
|
||||
title: Text('Share App'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
// Update the state of the app
|
||||
// ...
|
||||
Share.share('Checkout GitJournal https://gitjournal.io/');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
|
@ -345,6 +345,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -17,6 +17,7 @@ dependencies:
|
||||
package_info: ^0.3.2+1
|
||||
http: ^0.12.0+1
|
||||
badges: ^0.0.6
|
||||
share: ^0.6.0+1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_launcher_icons: "^0.7.0"
|
||||
|
Reference in New Issue
Block a user