Skip to content

Commit 5a3b270

Browse files
author
Tensor-Programming
authored
initial commit weather part 4 final
1 parent 7b9eb58 commit 5a3b270

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2102
-0
lines changed

android/app/build.gradle

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
apply plugin: 'com.android.application'
15+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
16+
17+
android {
18+
compileSdkVersion 27
19+
20+
lintOptions {
21+
disable 'InvalidPackage'
22+
}
23+
24+
defaultConfig {
25+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
26+
applicationId "com.example.weather"
27+
minSdkVersion 16
28+
targetSdkVersion 27
29+
versionCode 1
30+
versionName "1.0"
31+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
32+
}
33+
34+
buildTypes {
35+
release {
36+
// TODO: Add your own signing config for the release build.
37+
// Signing with the debug keys for now, so `flutter run --release` works.
38+
signingConfig signingConfigs.debug
39+
}
40+
}
41+
}
42+
43+
flutter {
44+
source '../..'
45+
}
46+
47+
dependencies {
48+
testImplementation 'junit:junit:4.12'
49+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
50+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
51+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.weather">
3+
4+
<!-- The INTERNET permission is required for development. Specifically,
5+
flutter needs it to communicate with the running application
6+
to allow setting breakpoints, to provide hot reload, etc.
7+
-->
8+
<uses-permission android:name="android.permission.INTERNET"/>
9+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
10+
11+
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
12+
calls FlutterMain.startInitialization(this); in its onCreate method.
13+
In most cases you can leave this as-is, but you if you want to provide
14+
additional functionality it is fine to subclass or reimplement
15+
FlutterApplication and put your custom class here. -->
16+
<application
17+
android:name="io.flutter.app.FlutterApplication"
18+
android:label="weather"
19+
android:icon="@mipmap/ic_launcher">
20+
<activity
21+
android:name=".MainActivity"
22+
android:launchMode="singleTop"
23+
android:theme="@style/LaunchTheme"
24+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
25+
android:hardwareAccelerated="true"
26+
android:windowSoftInputMode="adjustResize">
27+
<!-- This keeps the window background of the activity showing
28+
until Flutter renders its first frame. It can be removed if
29+
there is no splash screen (such as the default splash screen
30+
defined in @style/LaunchTheme). -->
31+
<meta-data
32+
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
33+
android:value="true" />
34+
<intent-filter>
35+
<action android:name="android.intent.action.MAIN"/>
36+
<category android:name="android.intent.category.LAUNCHER"/>
37+
</intent-filter>
38+
</activity>
39+
</application>
40+
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.example.weather;
2+
3+
import android.os.Bundle;
4+
5+
import io.flutter.app.FlutterActivity;
6+
import io.flutter.plugins.GeneratedPluginRegistrant;
7+
8+
public class MainActivity extends FlutterActivity {
9+
@Override
10+
protected void onCreate(Bundle savedInstanceState) {
11+
super.onCreate(savedInstanceState);
12+
GeneratedPluginRegistrant.registerWith(this);
13+
}
14+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package io.flutter.plugins;
2+
3+
import io.flutter.plugin.common.PluginRegistry;
4+
import io.intheloup.geolocation.GeolocationPlugin;
5+
6+
/**
7+
* Generated file. Do not edit.
8+
*/
9+
public final class GeneratedPluginRegistrant {
10+
public static void registerWith(PluginRegistry registry) {
11+
if (alreadyRegisteredWith(registry)) {
12+
return;
13+
}
14+
GeolocationPlugin.registerWith(registry.registrarFor("io.intheloup.geolocation.GeolocationPlugin"));
15+
}
16+
17+
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
18+
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
19+
if (registry.hasPlugin(key)) {
20+
return true;
21+
}
22+
registry.registrarFor(key);
23+
return false;
24+
}
25+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="@android:color/white" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)