Summary

This document provides a comprehensive tutorial on Flutter UI development, specifically focusing on Scaffold, Widgets, and other UI elements. Examples and reference code are included.

Full Transcript

Scaffolding & the Widget Tree, TextField Flutter UI and More Without Appbar ? Locate the AppBar in the Widget Tree After Title is added…. Widget Tree centerTitle: true Is it a widget? Body : is it similar to in html? Column widget has two more widgets What alignment is followed? floatin...

Scaffolding & the Widget Tree, TextField Flutter UI and More Without Appbar ? Locate the AppBar in the Widget Tree After Title is added…. Widget Tree centerTitle: true Is it a widget? Body : is it similar to in html? Column widget has two more widgets What alignment is followed? floatingActionButton Spot the difference, if you can ….. References https://api.flutter.dev/flutter/material/Scaffold-class.html Material Design for Colors https://m2.material.io/design/color/the-color-system.html#color-theme-creation Color Theme Selection https://m2.material.io/design/color/the-color-system.html#color-theme-creation Locate Scaffold in the Widget Tree Floating Action Button in Flutter App 01 How to change the shape? And color? 02 How to change the size? 03 How to change the Location? Floating Action button: How to change the shape? 1. use the shape property of FloatingActionButton() widget class. 2. Implement BeveledRectangleBorder() on this property. 3. The output will be a square floating action button, increase the border-radius value to make a circular type shape Floating Action Button: How to change color? Write the code to change the color of the floating Action button: Floating Action Button: How to change the Size? change the size of the floating action button, by wrapping it with SizedBox() widget and pass custom height and width. Or adding the constants to the FloatingActionButton () Output: Guess: Small, Regular, Large & Extended C A B D How to make an extended Floating Action button in a Scaffold with ICON + TEXT ? Create two extended floating action buttons : -> Update ->Submit Draggable Floating Action Button What container suits best for draggable floating action button? Text Field Text fields allow users to type text into an app. They are used to : ○ build forms, Flutter provides two text ○ send messages, fields: ○ create search experiences, and more. TextField and How to create and style text fields. TextFormField. TextField TextField is the most commonly used text input widget. By default, a TextField is decorated with an underline. You can add a label, icon, inline hint text, and error text by supplying an InputDecoration as the decoration property of the TextField. To remove the decoration entirely (including the underline and the space reserved for the label), set the decoration to null. Remove Underline borderSide property Rounded border borderRadius property Output TextFormField TextField TextFormField TextFormField wraps a TextField and integrates it with the enclosing Form. This provides additional functionality, such as ○ validation and ○ integration with other FormField widgets. child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Padding( padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16), child: TextField( decoration: InputDecoration( border: OutlineInputBorder(), hintText: 'Enter a search term', ), ), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16), child: TextFormField( decoration: const InputDecoration( border: UnderlineInputBorder(), labelText: 'Enter your username', ), ), ), ), ], ), Prefix Icon Suffix Icon Prefix Text Suffix Text child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Padding( padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16), child: TextField( decoration: InputDecoration( border: OutlineInputBorder(), hintText: 'Enter a search term', hintStyle: TextStyle( fontFamily: 'Cairo', fontStyle: FontStyle.italic, fontWeight: FontWeight.bold, ), prefixIcon: Icon(Icons.phone), ), //InputDecoration ), ), TextField: Password TextField String txt=”” Validating input with error messages Max characters The maxLength property accepts integer values to specify the maximum number of characters accepted by the particular field. After adding this property, if users enter a value with more characters than specified in maxLength, it will block the input automatically: References https://www.fluttercampus.com/guide/27/how-to-change-shape-size-and-location-of-floatinga ctionbutton-in-flutter-app/ The ultimate guide to text fields in Flutter - LogRocket Blog Build a form with validation | Flutter https://youtu.be/NL92YO9yTB0 Overview Firebase : a surface made by google Live hosting Data storage Authentication Backend Real time database: Firestore

Use Quizgecko on...
Browser
Browser