Skip to content
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

Merged
merged 9 commits into from
Apr 8, 2021
Merged

Adds new Magic Weather sample app #170

merged 9 commits into from
Apr 8, 2021

Conversation

codykerns
Copy link
Member

This PR adds the new 'MagicWeather' sample app to a new /Examples folder (for platform consistency).

Also leaves the existing example folder in place.

@codykerns codykerns requested review from vegaro, rkotzy and aboedo March 11, 2021 15:59
Copy link
Member

@aboedo aboedo left a 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 and Examples

Comment on lines 13 to 16
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
Copy link
Member

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);
Copy link
Member

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?

@vegaro
Copy link
Contributor

vegaro commented Mar 26, 2021

Sorry I missed this. Looking now

Copy link
Contributor

@vegaro vegaro left a 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(
Copy link
Contributor

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">
Copy link
Contributor

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">
Copy link
Contributor

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

@vegaro
Copy link
Contributor

vegaro commented Mar 26, 2021

Just fixed the lint job, it was missing the pub get in the example folder. Apparently running pub get in the root only does pub get in the package and in the current example, but not in Examples/MagicWeather. Anyhow, it shows the only real issue now

@aboedo aboedo merged commit 5f6b1f5 into develop Apr 8, 2021
@aboedo aboedo deleted the samples/magic-weather branch April 8, 2021 14:15
@aboedo aboedo mentioned this pull request Apr 8, 2021
Jethro87 pushed a commit to Jethro87/purchases-flutter that referenced this pull request Jan 4, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants