Skip to content

Commit cb349ce

Browse files
authored
first commit
0 parents  commit cb349ce

File tree

7 files changed

+304
-0
lines changed

7 files changed

+304
-0
lines changed

assets/appbar.json

+1
Large diffs are not rendered by default.

assets/logo.gif

32.3 KB
Loading

assets/logo.jpeg

98.5 KB
Loading

assets/saudeunica.png

108 KB
Loading

lib/dados.dart

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:ffi/ffi.dart';
3+
4+
class dados extends StatelessWidget {
5+
const dados({super.key});
6+
7+
@override
8+
Widget build(BuildContext context) {
9+
return Scaffold(
10+
appBar: AppBar(
11+
title: Text('DADOS COMPILADOS'),
12+
),
13+
body: Center(
14+
child: Text('Aqui estão os dados compilados na linguagem python', textAlign: TextAlign.center),
15+
),
16+
);
17+
}
18+
}

lib/main.dart

+184
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_collapsing_toolbar/flutter_collapsing_toolbar.dart';
3+
import 'package:lottie/lottie.dart';
4+
import 'dados.dart';
5+
import 'package:url_launcher/url_launcher.dart';
6+
7+
void main() => runApp(MyApp());
8+
9+
const kSampleIcons = [
10+
Icons.track_changes_outlined,
11+
Icons.wifi_protected_setup_outlined,
12+
Icons.account_box_outlined,
13+
];
14+
const kSampleIconLabels = [
15+
'DADOS',
16+
'GITHUB',
17+
];
18+
19+
class MyApp extends StatefulWidget {
20+
@override
21+
_MyAppState createState() => _MyAppState();
22+
}
23+
24+
class _MyAppState extends State<MyApp> {
25+
final controller = ScrollController();
26+
double headerOffset = 0.0;
27+
final String githubUrl = 'https://github.com/LeticiaBHB';
28+
29+
30+
@override
31+
Widget build(BuildContext context) {
32+
return MaterialApp(
33+
initialRoute: '/',
34+
routes: {
35+
'/dados': (context) => dados(),
36+
},
37+
home: Scaffold(
38+
body: Container(
39+
margin: const EdgeInsets.only(top: 24.0),
40+
child: Column(
41+
children: [
42+
Align(
43+
alignment: Alignment.topCenter,
44+
child: CollapsingToolbar(
45+
controller: controller,
46+
expandedHeight: 160,
47+
collapsedHeight: 64,
48+
decorationForegroundColor: Colors.deepOrange.shade400,
49+
decorationBackgroundColor: Colors.brown.shade200,
50+
onCollapsing: (double offset) {
51+
setState(() {
52+
headerOffset = offset;
53+
});
54+
},
55+
leading: Container(
56+
margin: EdgeInsets.only(left: 12),
57+
padding: EdgeInsets.all(4),
58+
decoration: ShapeDecoration(
59+
color: Colors.orange[200],
60+
shape: CircleBorder(),
61+
),
62+
child: Icon(
63+
Icons.access_alarm_outlined,
64+
size: 24,
65+
color: Colors.red,
66+
),
67+
),
68+
title: Text(
69+
'Material Particulado - PM 2.5',
70+
style: TextStyle(
71+
fontSize: 16,
72+
color: Colors.black,
73+
fontWeight: FontWeight.w600,
74+
),
75+
),
76+
featureCount: 2,
77+
featureIconBuilder: (context, index) {
78+
return InkWell(
79+
onTap: () => _onFeaturePressed(context, index),
80+
// Passar o contexto e o índice para o método
81+
child: Icon(
82+
kSampleIcons[index],
83+
size: 54,
84+
color: Colors.orange[200],
85+
),
86+
);
87+
},
88+
featureLabelBuilder: (context, index) {
89+
return Text(
90+
kSampleIconLabels[index],
91+
textAlign: TextAlign.center,
92+
maxLines: 1,
93+
style: TextStyle(
94+
fontSize: 12,
95+
color: Colors.black,
96+
),
97+
);
98+
},
99+
featureOnPressed: (BuildContext context, int index) {},
100+
),
101+
),
102+
Expanded(
103+
child: Container(
104+
color: Colors.brown.shade200,
105+
child: SingleChildScrollView(
106+
controller: controller,
107+
child: Column(
108+
children: [
109+
Container(
110+
height: headerOffset,
111+
),
112+
Lottie.asset(
113+
'assets/appbar.json',
114+
width: 200,
115+
height: 200,
116+
fit: BoxFit.fill,
117+
),
118+
Container(
119+
height: 200,
120+
width: 350,
121+
color: Colors.brown.shade200,
122+
child: Center(
123+
child: Column(
124+
mainAxisAlignment: MainAxisAlignment.center,
125+
children: [
126+
Text(
127+
"PM2.5 é um sério problema de poluição atmosférica que afeta a saúde e o meio ambiente.",
128+
textAlign: TextAlign.center,
129+
style: TextStyle(
130+
color: Colors.black, fontSize: 20),
131+
),
132+
SizedBox(height: 16),
133+
// Espaço de 16 de altura entre os parágrafos
134+
Text(
135+
"E a medicina veterinária é a guardiã da Saúde Única. Tendo isto em vista venho por meio deste apresentar os dados processados, em comparação com mortalidade de aves migratórias",
136+
textAlign: TextAlign.center,
137+
style: TextStyle(
138+
color: Colors.black, fontSize: 20),
139+
),
140+
],
141+
),
142+
),
143+
),
144+
Container(
145+
child: Image.asset('assets/saudeunica.png'),
146+
width: 200,
147+
height: 200,
148+
),
149+
],
150+
),
151+
),
152+
),
153+
),
154+
],
155+
),
156+
),
157+
),
158+
);
159+
}
160+
161+
// Método para abrir URLs em um navegador externo
162+
Future<void> _launchURL(String url) async {
163+
if (await canLaunch(url)) {
164+
await launch(url);
165+
} else {
166+
throw 'Não foi possível abrir a URL: $url';
167+
}
168+
}
169+
170+
// Método para lidar com o evento do botão de recurso
171+
void _onFeaturePressed(BuildContext context, int index) {
172+
switch (index) {
173+
case 0:
174+
// Abre a página 'dados' quando o primeiro recurso é pressionado
175+
Navigator.pushNamed(context, '/dados');
176+
break;
177+
case 1:
178+
// Abre o link do GitHub no navegador externo quando o segundo recurso é pressionado
179+
_launchURL(githubUrl);
180+
break;
181+
default:
182+
}
183+
}
184+
}

pubspec.yaml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: criadordemusica
2+
description: A new Flutter project.
3+
# The following line prevents the package from being accidentally published to
4+
# pub.dev using `flutter pub publish`. This is preferred for private packages.
5+
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
6+
7+
# The following defines the version and build number for your application.
8+
# A version number is three numbers separated by dots, like 1.2.43
9+
# followed by an optional build number separated by a +.
10+
# Both the version and the builder number may be overridden in flutter
11+
# build by specifying --build-name and --build-number, respectively.
12+
# In Android, build-name is used as versionName while build-number used as versionCode.
13+
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
14+
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
15+
# Read more about iOS versioning at
16+
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17+
# In Windows, build-name is used as the major, minor, and patch parts
18+
# of the product and file versions while build-number is used as the build suffix.
19+
version: 1.0.0+1
20+
21+
environment:
22+
sdk: '>=3.0.1 <4.0.0'
23+
24+
# Dependencies specify other packages that your package needs in order to work.
25+
# To automatically upgrade your package dependencies to the latest versions
26+
# consider running `flutter pub upgrade --major-versions`. Alternatively,
27+
# dependencies can be manually updated by changing the version numbers below to
28+
# the latest version available on pub.dev. To see which dependencies have newer
29+
# versions available, run `flutter pub outdated`.
30+
dependencies:
31+
flutter:
32+
sdk: flutter
33+
34+
35+
# The following adds the Cupertino Icons font to your application.
36+
# Use with the CupertinoIcons class for iOS style icons.
37+
cupertino_icons: ^1.0.2
38+
flutter_collapsing_toolbar: ^1.0.0
39+
icons_launcher: ^2.1.3
40+
lottie: ^2.5.0
41+
url_launcher: ^6.0.10
42+
ffi: ^2.0.2
43+
44+
dev_dependencies:
45+
flutter_test:
46+
sdk: flutter
47+
48+
# The "flutter_lints" package below contains a set of recommended lints to
49+
# encourage good coding practices. The lint set provided by the package is
50+
# activated in the `analysis_options.yaml` file located at the root of your
51+
# package. See that file for information about deactivating specific lint
52+
# rules and activating additional ones.
53+
flutter_lints: ^2.0.0
54+
55+
# For information on the generic Dart part of this file, see the
56+
# following page: https://dart.dev/tools/pub/pubspec
57+
58+
# The following section is specific to Flutter packages.
59+
flutter:
60+
61+
# The following line ensures that the Material Icons font is
62+
# included with your application, so that you can use the icons in
63+
# the material Icons class.
64+
uses-material-design: true
65+
66+
# To add assets to your application, add an assets section, like this:
67+
assets:
68+
- assets/appbar.json
69+
- assets/saudeunica.png
70+
71+
72+
# An image asset can refer to one or more resolution-specific "variants", see
73+
# https://flutter.dev/assets-and-images/#resolution-aware
74+
75+
# For details regarding adding assets from package dependencies, see
76+
# https://flutter.dev/assets-and-images/#from-packages
77+
78+
# To add custom fonts to your application, add a fonts section here,
79+
# in this "flutter" section. Each entry in this list should have a
80+
# "family" key with the font family name, and a "fonts" key with a
81+
# list giving the asset and other descriptors for the font. For
82+
# example:
83+
# fonts:
84+
# - family: Schyler
85+
# fonts:
86+
# - asset: fonts/Schyler-Regular.ttf
87+
# - asset: fonts/Schyler-Italic.ttf
88+
# style: italic
89+
# - family: Trajan Pro
90+
# fonts:
91+
# - asset: fonts/TrajanPro.ttf
92+
# - asset: fonts/TrajanPro_Bold.ttf
93+
# weight: 700
94+
#
95+
# For details regarding fonts from package dependencies,
96+
# see https://flutter.dev/custom-fonts/#from-packages
97+
icons_launcher:
98+
image_path: "logo.jpeg"
99+
platforms:
100+
android:
101+
enable: true

0 commit comments

Comments
 (0)