-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds new Magic Weather sample app #170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Leaving a couple of questions:
- do we actually need to have a
lib/main.dart
? I'm not sure if running straight from terminal works without it - would having it in
Examples
actually be more confusing for developers? we now have to folders:example
andExamples
const kColorNavigationBar = Color(0xff121212); // top nav bar | ||
const kColorBottomNavigationBar = Color(0xff121212); // bottom nav bar | ||
const kColorText = Color(0xffffffff); // text color | ||
const kColorPrimary = Color(0xff000000); // background |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the comments on these lines don't add much since they mostly match the variable names. I'd remove them and make the variable names slightly more explicit so the comments aren't needed (i.e.: kColorNavigationBar
-> kColorTopNavigationBar
|
||
String temperature = randomTemperature.toString(); | ||
String emoji = "🥶"; | ||
Color weatherColor = Color.fromRGBO(3, 75, 132, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a bit of a mixed bag when creating colors, with some of them hex and others rgb. Maybe we could unify them and keep them in a single Colors.dart
file so they're easy to reuse?
Sorry I missed this. Looking now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the package name it looks good to me. I am not sure why the lint is complaining. I am going to look into it. It only complains when running flutter analyze
in the root which is strange
this.content, | ||
), | ||
actions: <Widget>[ | ||
new FlatButton( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a warning that says FlatButton
is deprecated and TextButton
should be used
@@ -0,0 +1,7 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="m4trixdevlimited.com.flutter_magic_weather_app"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we update this package name? in other examples we have com.revenuecat.sample
if I am not wrong
@@ -0,0 +1,51 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="m4trixdevlimited.com.flutter_magic_weather_app"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question here about the package name
Just fixed the lint job, it was missing the |
* Adds new Magic Weather sample app * refactor colors/styles into styles.dart, move constants file * fixes lint * replaced uses of FlatButton with TextButton, removed unnecessary usages of `new` * added pedantic and analysis_options.yaml to MagicWeather * more linter fixes * updated package name for consistency with other samples * updated package name for iOS as well Co-authored-by: Cody Kerns <[email protected]> Co-authored-by: vegaro <[email protected]> Co-authored-by: Andy Boedo <[email protected]>
This PR adds the new 'MagicWeather' sample app to a new /Examples folder (for platform consistency).
Also leaves the existing example folder in place.