FLUTTER CALCULATOR • 1 • UI

Поділитися
Вставка
  • Опубліковано 6 жов 2024
  • 💰 I'll develop your MVP app: mitchkoko.app/mvp
    📱 Code: mitchkoko.app/
    🎓 Flutte Beginner Course: • 📱 FULL Flutter Beginne...
    💌 Email: business@mitchkoko.app
    ~;
    / createdbykoko
    / createdbykoko
    / createdbykoko
    / mitchkoko
    ~;
    ---------------------------------------------------------------
    Flutter + Dart Programming = how to create a fully functioning calculator
    ---------------------------------------------------------------
    #1 - UI
    #2 - Input, Clear, Delete
    #3 - Evaluate
    ---------------------------------------------------------------
    #fluttercalculator

КОМЕНТАРІ • 46

  • @createdbykoko
    @createdbykoko  Рік тому

    🎓 Flutter Beginner Course • ua-cam.com/video/swiMBX4Vt94/v-deo.html
    📖 Flutter Beginner Handbook • mitchkoko.gumroad.com/l/FlutterBeginnerHandbook
    📱 Flutter App Templates • mitchkoko.app/
    📞 Flutter Consultation Call • mitchkoko.gumroad.com/l/CallWithMitch

  • @kahanx10
    @kahanx10 2 роки тому +2

    I loved your approach of coloring the buttons, here's what I followed:
    text color property (will become purple based on setColor's condition):
    var textColor = Colors.white;
    instance method of the custom button class:
    void setColor(String value) {
    if (buttonText == 'C') {
    buttonColor = Colors.green;
    } else if (buttonText == 'DEL') {
    buttonColor = Colors.red;
    } else if ('%/x-+='.split('').contains(buttonText)) {
    buttonColor = Colors.deepPurple;
    } else {
    buttonColor = Colors.white;
    textColor = Colors.deepPurple;
    }
    }
    builder method of the gridview:
    (context, index) {
    var button = MyButton( buttonText: buttons[index] );
    button.setColor(buttons[index]);
    return button;
    }

  • @khalidnasser
    @khalidnasser 4 роки тому +8

    I'm New in flutter this is my first week in it
    thank you so much
    i hope one day i'll be good as you
    and Keep posting M right with to to the end

  • @fabianmuller335
    @fabianmuller335 3 роки тому +2

    At 10:36 you could use '%/*-+='.split('').contains(x)

  • @funnylamb2946
    @funnylamb2946 10 місяців тому +3

    Use required while declaring buttontext to avoid errors
    Required this.buttontext

  • @vishavjeetsharma5824
    @vishavjeetsharma5824 4 роки тому +2

    if any one is getting error ..... add this line in starting the video was cut when he add this line import 'package:calculator/buttons.dart'; (replace calculator with your project name)

  • @ahmedseddik2748
    @ahmedseddik2748 3 роки тому

    Your explanation is very beautiful and clear

  • @anasyunus3389
    @anasyunus3389 4 роки тому +1

    im also using vs code but your formatting looks far better than mine......Did you add any plugins or what??

  • @leonardoviana2404
    @leonardoviana2404 4 роки тому +1

    Awesome video!
    But how to keep the buttons responsive when rotating the screen?

    • @Ainigma
      @Ainigma 3 роки тому +3

      Great question. Flutter has you covered.
      From the original documentation (flutter.dev/docs/cookbook/design/orientation):
      OrientationBuilder(
      builder: (context, orientation) {
      return GridView.count(
      // Create a grid with 2 columns in portrait mode,
      // or 3 columns in landscape mode.
      crossAxisCount: orientation == Orientation.portrait ? 2 : 3,
      );
      },
      );

  • @thunderemperor7553
    @thunderemperor7553 4 роки тому +2

    Nice tutorial bro but I have one question. When you created List those all were strings but if I want to add different types in the same list is it possible to do so?
    For Example:
    List data = ['clear' , Icons.backspace, '9'];
    this results in type icon is not a sub type of string.
    I tried this also but can't get the result I wanted:
    List data = ['clear' , Icons.backspace, '9'];
    How to add integers, string, icon, and many more data types in the same list?

    • @createdbykoko
      @createdbykoko  3 роки тому +2

      For this just use the ‘var’ type. So instead of ‘List data’, you can do ‘var data’. Inside you can put any type :)

  • @ai-bloggers
    @ai-bloggers 2 роки тому

    you are the best!!!

  • @Alt-wx6ry
    @Alt-wx6ry 4 роки тому +1

    Subscribed! Keep more coming :)

  • @elextheplaner3172
    @elextheplaner3172 Рік тому

    itemCount: buttons.length, please idnt know why button is showing error.....please help me out

  • @mahmudizukri
    @mahmudizukri 4 роки тому

    keep it up bro

  • @letstry.coding_2816
    @letstry.coding_2816 3 роки тому +1

    Very Helpful

  • @sanketpatel7924
    @sanketpatel7924 4 роки тому +2

    And i will share your channel also 😊
    I am guy who send messages in Instagram 😁

  • @aadityajoshi260
    @aadityajoshi260 4 роки тому

    Awesome content man..
    Keep posting

  • @viper379
    @viper379 3 роки тому

    How do I add a voice command that will calculate what I say? Please make a viedo.

    • @createdbykoko
      @createdbykoko  3 роки тому +1

      Interesting! Voice recognition. I will give it a go :)

  • @sanketpatel7924
    @sanketpatel7924 4 роки тому

    We want more videos

  • @wesleysilveira5692
    @wesleysilveira5692 9 місяців тому

    aboout the colors thing, i did the following:
    (isOperator function)
    dynamic isOperator(String x) {
    if ('!%+x/=-'.split("").contains(x)) {
    return [Colors.deepPurple, Colors.white];
    } else if (x == 'C') {
    return [Colors.green, Colors.white];
    } else if (x == 'DEL') {
    return [Colors.red, Colors.white];
    }
    // numbers
    return [Colors.white, Colors.deepPurple[500]];
    }
    (how i implemented:)
    return MyButton(
    buttonText: buttons[index],
    color: isOperator(buttons[index])[0],
    textColor: isOperator(buttons[index])[1]
    );

  • @sanketpatel7924
    @sanketpatel7924 4 роки тому

    Cool bro

  • @santoshmaharana4020
    @santoshmaharana4020 3 роки тому

    bro, how can make one button big size of two-button 'ANS ' '=' by replacing it single ' = ' button?

    • @wesleysilveira5692
      @wesleysilveira5692 9 місяців тому +1

      make a gridview with all elements but the last row.
      in that last row you will use the widget Row and then you can personalize it (using three containers with different sizes which you can use the "flex" property to do it in the right ratio)

  • @harrydeora203
    @harrydeora203 3 роки тому

    Which software you are using for coding

  • @Joshua_Raj1122
    @Joshua_Raj1122 4 роки тому

    hey dude please help me. I am getting the error: The method 'MyButton' isn't defined for the type '_HomePageState'.
    what should i do

    • @createdbykoko
      @createdbykoko  4 роки тому +1

      Josh Gamerz that means you need to import the button.dart file. Click on the MyButton that has red underline on it, it should give you an option to import the file

    • @Joshua_Raj1122
      @Joshua_Raj1122 4 роки тому +1

      @@createdbykoko yes it works now..,...... Thank you very much bro.
      You helped me to build my first app.. Thank you very much

  • @NikhilYadav-ru9vf
    @NikhilYadav-ru9vf Рік тому

    3:13 borderRadius not working in my pc

  • @Kaizokn
    @Kaizokn 3 роки тому

    download code:?

    • @createdbykoko
      @createdbykoko  3 роки тому +1

      Hii its free on my github!

    • @Kaizokn
      @Kaizokn 3 роки тому

      @@createdbykoko link

  • @razuahmed3493
    @razuahmed3493 Рік тому

    that's cool.🤍🤍