Skip to content

Commit

Permalink
[FINAL] VERSÃO 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
renathohcc committed Sep 24, 2021
1 parent 13fdcb5 commit 1c937a9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
25 changes: 23 additions & 2 deletions anime_quotes/lib/main.dart
@@ -1,9 +1,11 @@
import 'package:clipboard/clipboard.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:share/share.dart';

void main() => runApp(const MyApp());

Expand Down Expand Up @@ -85,7 +87,26 @@ class QuoteState extends State<QuoteWidget> {
textAlign: TextAlign.center,
style: TextStyle(fontStyle: FontStyle.italic),
),
Padding(padding: EdgeInsets.only(bottom: 180.0)),
Padding(padding: EdgeInsets.only(bottom: 20.0)),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
onPressed: () async {
await FlutterClipboard.copy(_quote["quote"].toString());
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: const Text("Citação Copiada!",
textAlign: TextAlign.center)));
},
icon: Icon(Icons.content_copy)),
IconButton(
onPressed: () async {
await Share.share(_quote["quote"].toString());
},
icon: Icon(Icons.share))
],
),
Padding(padding: EdgeInsets.only(bottom: 250.0)),
Container(
width: 130,
height: 50,
Expand All @@ -96,7 +117,7 @@ class QuoteState extends State<QuoteWidget> {
backgroundColor:
MaterialStateProperty.all<Color>(Colors.deepPurple)),
),
)
),
]);
}
}
Expand Down
22 changes: 22 additions & 0 deletions anime_quotes/pubspec.lock
Expand Up @@ -29,6 +29,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clipboard:
dependency: "direct main"
description:
name: clipboard
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -109,6 +116,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
Expand All @@ -123,6 +137,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.1"
share:
dependency: "direct main"
description:
name: share
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -186,3 +207,4 @@ packages:
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
2 changes: 2 additions & 0 deletions anime_quotes/pubspec.yaml
Expand Up @@ -30,6 +30,8 @@ dependencies:
flutter:
sdk: flutter
http: ^0.13.3
share: ^2.0.4
clipboard: ^0.1.3

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
Expand Down

0 comments on commit 1c937a9

Please sign in to comment.