Skip to main content

Flutter Development (Day-10):



  • From Today onwards we are going to make some sample projects in order to put our prevous knowledge of learning.
  • We are going to make a simple TODO application which I will be building it from scratch.
  • This application will have Cards,Alert Dialogues,Implement Stack Operations,Swipe To Dismiss,Snackbars and lot more.
  • This post will give you the setup and some basic Structure of the App.
  • All source code : Click Here.

Screenshots:



Explanation:

From now-onwards I will explain only main things because when I place a lot of code here you will be confused .Thereby you can see all source code in my Github (I will place a link here).

  • To copy the exact code to start building click here.
  •  theme: defaultTargetPlatform == TargetPlatform.iOS ? ThemeData.dark(): ThemeData.light() , here based on the OS we are defining the theme.Otherwise you can define by using ThemeData property.
  • shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0),), : If you want a shape for the Appbar or someother widgets use shape property.
  • Define a Global Key which is of FormState and Controller for controlling the text in TextFormField.
  • If you want to validate your Form use Validator property.
  • validator: (val) { if (val.isEmpty) { return "Please Enter A Task"; } return null; },
  • onSaved: (val) { _controller.text = val; },
  • When ADD button is pressed we have to check whether the TextFormField is empty or not here we can solve it by using validator and by using a formKey.
  • _validateForm() { if (_key.currentState.validate()) { setState(() {
  • _todos.add(_controller.text); }); _controller.clear(); Navigator.of(context).pop(); } }.

Follow me on:
 Twitter    Github    LinkedIn

Comments

  1. It's really a nice and helpful piece of information. Thank you for sharing this with us. Flutter App Development

    ReplyDelete

Post a Comment

Popular posts from this blog

Flutter Development (Day-16): All source code :  Click Here . Sorry for the last two days I haven't posted anything because I am ready to leave my hometown to attend my college.Is there anyone from AndhraPradesh or Tamilnadu .If yes please provide your city name in the comment section. In this post we are going to proceed the next level of our todo app.We are going add animations to our app,Code clean Up and some UI changes. We add the animation to our FloationgActionButton.You may ask why you haven't add animations to others as well? I tried it but it is looking weird. Adding animations to  FloationgActionButton is very much similar to our previous basic animation tutorial. From the next we are going to deal with some of the important widgets which we will be using in further tutorials. If you are following this tutorial / blog please leave your opinion 👀 / say Hii ✋/ Your e-mail in the comment section that I can improve myself and it will gives boost for me t...
Flutter Development (Day-00): This is the First Post from this Blog.This blog will tell you about Flutter.If you don't know about it then the upcoming posts will explain you everything.This is 30 day tutorial which explains about Flutter for absolute beginners. prerequsites:  If you are enthusiastic and Curious. All source code :  Click Here . If you are following this tutorial / blog please leave your opinion 👀 / say Hii ✋/ Your e-mail in the comment section that I can improve myself and it will gives boost for me to do more tutorials. If you have any doubts feel free to ask me in the comment section or email me ramubugudi4@gmail.com I can definetly give reply. Follow me on:   Twitter   Github     LinkedIn
Flutter Development (Day-13): In this post we are going to talk about basic animations in Flutter First we start the animation by creating two objects Animation animation, AnimationController animationController. Animation lets us deal with different types of animations like Tween. The tween is something in which you specify the input output range. Here begin is set to -1 and end is 0.0 which means the animation happens from out of the screen to the center of the screen. or rather, from the left most edge to the center of the app. We are also doing an ease in animation, so we specify the curve as fast out slow in. In the initState we provide the animation because the animation should occur when user launches the app.    void initState() {      super.initState();      animationController = AnimationController(        vsync: this,        duration: Duration(       ...