Skip to content

Commit ea045b7

Browse files
authored
Merge pull request #2 from morenosh/resolve-issues
Resolve issues
2 parents fe8e778 + f3af114 commit ea045b7

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

android/settings.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,17 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
99
def flutterSdkPath = properties.getProperty("flutter.sdk")
1010
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
1111
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12+
13+
14+
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
15+
16+
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
17+
if (pluginsFile.exists()) {
18+
pluginsFile.withReader('UTF-8') { reader -> properties.load(reader) }
19+
}
20+
21+
properties.each { name, path ->
22+
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
23+
include ":$name"
24+
project(":$name").projectDir = pluginDirectory
25+
}

lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ class MyApp extends StatelessWidget {
2929
),
3030
scaffoldBackgroundColor: Colors.white,
3131
primaryColor: Colors.blue,
32-
accentColor: Colors.white,
3332
visualDensity: VisualDensity.adaptivePlatformDensity,
33+
colorScheme:
34+
ColorScheme.fromSwatch().copyWith(secondary: Colors.white),
3435
),
3536
home: HomeScreen(),
3637
routes: {

lib/widgets/mainWeather.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ class MainWeather extends StatelessWidget {
2424
padding: EdgeInsets.fromLTRB(25, 15, 25, 5),
2525
height: MediaQuery.of(context).size.height / 3.4,
2626
width: MediaQuery.of(context).size.width,
27-
child: Column(
28-
crossAxisAlignment: CrossAxisAlignment.center,
29-
mainAxisAlignment: MainAxisAlignment.start,
27+
child: ListView(
3028
children: [
3129
Row(
3230
mainAxisAlignment: MainAxisAlignment.center,

lib/widgets/sevenDayForecast.dart

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class SevenDayForecast extends StatelessWidget {
2828
Padding(
2929
padding: const EdgeInsets.fromLTRB(5, 5, 5, 20),
3030
child:
31-
MapString.mapStringToIcon('${weather.condition}', context, 35),
31+
MapString.mapStringToIcon('${weather.condition}', context, 35),
3232
),
3333
Text(
3434
'${weather.condition}',
@@ -70,9 +70,7 @@ class SevenDayForecast extends StatelessWidget {
7070
),
7171
],
7272
),
73-
child: Column(
74-
mainAxisAlignment: MainAxisAlignment.spaceAround,
75-
crossAxisAlignment: CrossAxisAlignment.start,
73+
child: ListView(
7674
children: [
7775
Row(
7876
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -105,16 +103,12 @@ class SevenDayForecast extends StatelessWidget {
105103
],
106104
),
107105
SizedBox(height: 15),
108-
Expanded(
109-
child: ListView(
110-
scrollDirection: Axis.horizontal,
111-
children: [
112-
Row(
113-
children: dWeather
114-
.map((item) => dailyWidget(item, context))
115-
.toList(),
116-
),
117-
],
106+
SingleChildScrollView(
107+
scrollDirection: Axis.horizontal,
108+
child: Row(
109+
children: dWeather
110+
.map((item) => dailyWidget(item, context))
111+
.toList(),
118112
),
119113
),
120114
],

0 commit comments

Comments
 (0)