Giter VIP home page Giter VIP logo

flutter_planets_tutorial's Introduction

flutter planets tutorial

This project contains the steps followed on the tutorial on sergiandreplace.com.

Each lesson will correspond to a single branch with the name of the post where you'll be able to find the result of what is explained in the article

Remember all the graphical assets and the design is created by Vijay Verma

flutter_planets_tutorial's People

Contributors

devoncarew avatar sergiandreplace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_planets_tutorial's Issues

Confused that The hight of PlanetRow less than planetCard

hi, bro
I was confused that the hight of planetRow is 120.0 ,less than the hight of planetCard 124.0, but the planetCard is child of planetRow ,what means here? what hight show in reality ? I provide that 120.0 show in reality, what influence of the hight of planetRow? looking forward your response ,thank u!

until update for new version

Install new version of Flutter, then:

git clone https://github.com/sergiandreplace/flutter_planets_tutorial.git flutter_planets_tutorial2

flutter create flutter_planets_tutorial

copy ./flutter_planets_tutorial2/lib ./flutter_planets_tutorial/lib

copy ./flutter_planets_tutorial2/assets ./flutter_planets_tutorial/assets

cd /flutter_planets_tutorial/

flutter run

other way, I did not get gradle to work.

Bottom overflowed by 2.0 pixels

`import 'package:flutter/material.dart';
import 'package:my_flutter_plannets/model/planets.dart';

class PlanetRow extends StatelessWidget {

final Planet planet;

PlanetRow(this.planet);

@OverRide
Widget build(BuildContext context) {
final planetThumbnail = new Container(
margin: new EdgeInsets.symmetric(
vertical: 16.0
),
alignment: FractionalOffset.centerLeft,
child: new Image(
image: new AssetImage(planet.image),
height: 92.0,
width: 92.0,
),
);

final baseTextStyle = const TextStyle(
    fontFamily: 'Poppins'
);
final regularTextStyle = baseTextStyle.copyWith(
    color: const Color(0xffb6b2df),
    fontSize: 9.0,
    fontWeight: FontWeight.w400
);
final subHeaderTextStyle = regularTextStyle.copyWith(
    fontSize: 12.0
);
final headerTextStyle = baseTextStyle.copyWith(
    color: Colors.white,
    fontSize: 18.0,
    fontWeight: FontWeight.w600
);

Widget _planetValue({String value, String image}) {
  return new Row(
      children: <Widget>[
        new Image.asset(image, height: 12.0),
        new Container(width: 8.0),
        new Text(planet.gravity, style: regularTextStyle),
      ]
  );
}


final planetCardContent = new Container(
  margin: new EdgeInsets.fromLTRB(76.0, 16.0, 16.0, 16.0),
  constraints: new BoxConstraints.expand(),
  child: new Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: <Widget>[
      new Container(height: 4.0),
      new Text(planet.name, style: headerTextStyle),
      new Container(height: 10.0),
      new Text(planet.location, style: subHeaderTextStyle),
      new Container(
          margin: new EdgeInsets.symmetric(vertical: 8.0),
          height: 2.0,
          width: 18.0,
          color: new Color(0xff00c6ff)
      ),
      new Row(
        children: <Widget>[
          new Expanded(
              child: _planetValue(
                  value: planet.distance,
                  image: 'assets/img/ic_distance.png')

          ),
          new Expanded(
              child: _planetValue(
                  value: planet.gravity,
                  image: 'assets/img/ic_gravity.png')
          )
        ],
      ),
    ],
  ),
);


final planetCard = new Container(
  child: planetCardContent,
  height: 124.0,
  margin: new EdgeInsets.only(left: 46.0),
  decoration: new BoxDecoration(
    color: new Color(0xFF333366),
    shape: BoxShape.rectangle,
    borderRadius: new BorderRadius.circular(8.0),
    boxShadow: <BoxShadow>[
      new BoxShadow(
        color: Colors.black12,
        blurRadius: 10.0,
        offset: new Offset(0.0, 10.0),
      ),
    ],
  ),
);


return new Container(
    height: 120.0,
    margin: const EdgeInsets.symmetric(
      vertical: 16.0,
      horizontal: 24.0,
    ),
    child: new Stack(
      children: <Widget>[
        planetCard,
        planetThumbnail,
      ],
    )
);

}
}
screenshot_1521020206
`

Stuck in Initializing gradle

I am newbie so sorry for any inconvenience ..
I just cloned the project to my PC, and opened it with Android Studio ..
It showed an error regarding the path for Dart and Flutter SDK .. I provided the path.
But every time I try to run the app it's getting stuck in Initializing gradle and nothing happening.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.