التخطي إلى المحتوى الرئيسي

المشاركات

عرض الرسائل ذات التصنيف Flutter Advance Code

Flutter Firebase Integration Step by Step

  Complete Tutorial: Integrating Firebase with Flutter This tutorial provides a step-by-step guide to setting up Firebase in a Flutter application, including configuration and implementation of Firebase Authentication, Firestore, and Firebase Cloud Messaging (FCM). Prerequisites Flutter SDK : Ensure Flutter is installed and set up. Run flutter doctor to verify. Firebase Account : Create an account at Firebase Console. IDE : Use VS Code, Android Studio, or IntelliJ IDEA with Flutter and Dart plugins. Basic Flutter Knowledge : Familiarity with Flutter widgets and Dart programming. Step 1: Create a Flutter Project Open your terminal or command prompt. Run the following command to create a new Flutter project: flutter create firebase_flutter_app Navigate to the project directory: cd firebase_flutter_app Step 2: Create a Firebase Project Go to the Firebase Console. Click Add project , enter a project name (e.g., FirebaseFlutterApp ), and follow the prompts to cre...

Flutter Database CRUD Operation

Flutter Database CRUD Operation : In this article i have described how to create database using SQFlite database under SQLITE database package. import 'package:flutter/material.dart' ; import 'dart:async' ; import 'package:path/path.dart' ; import 'package:sqflite/sqflite.dart' ; void main () {   runApp ( const MyApp ()); } class MyApp extends StatelessWidget {   const MyApp ({ super . key });   @ override   Widget build ( BuildContext context ) {     return MaterialApp (       title : 'Book Database' ,       theme : ThemeData ( primarySwatch : Colors . blue ),       home : const MyHomePage (),     );   } } class MyHomePage extends StatefulWidget {   const MyHomePage ({ super . key });   @ override   State < MyHomePage > createState () => _MyHomePageState (); } class _MyHomePageState extends State < MyHomePage > {   late Future < Da...

Flutter Tabbar Example | Flutter TabController Code Snippet

In Flutter,  is a widget used to create a tabbed interface, allowing users to navigate between different views easily. It works in conjunction with  and  to display multiple pages or sections within a single screen. Here’s a basic example of how  is implemented:

Flutter Card Widget Example | Card Widget complete code in flutter

 Flutter Card Widget Example | Card Widget complete code in flutter import 'package:flutter/material.dart' ; class Cardwidget extends StatelessWidget {   const Cardwidget ({ super . key });       @ override     Widget build ( BuildContext context ) {       return Scaffold (         appBar : AppBar (           title : Text ( "Welcome in Card Widget" ),         ),         body : Center (           child : Container (             width : 320 ,               height : 220 ,               padding : EdgeInsets . all ( 10.0 ),               child : Card (             shape : RoundedRectangleBorder (               borderRadiu...

AlertDialog in Flutter | Flutter Alert Dialog Example

AlertDialog in Flutter | Flutter Alert Dialog Example:   it is used to display message box into flutter application. AlertDialog(title:Text("content") ................................................ Type of Alert Dialog 1) Basic AlertDialog 2) Confirmation Dialog 3) Select AlertDialog 4) TextField AlertDialog Example of BasicAlertDialog: import 'package:flutter/material.dart'; class MyAlertDialog extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(       home: HomeScreen(),     );   } } class HomeScreen extends StatelessWidget {   void _showAlertDialog(BuildContext context) {     showDialog(       context: context,       builder: (BuildContext context) {         return AlertDialog(           title: Text("Alert"),           content: Text("This is an alert dialog in Flutter...

Most Important Flutter Widgets Code snippet | Learn Flutter by Code

 Create Complete quiz app using flutter app with timer : import 'dart:async'; import 'package:flutter/material.dart'; class quizApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(       home: quizAppScreen(),     );   } } class quizAppScreen extends StatefulWidget {   @override   quizAppScreenState createState() => quizAppScreenState(); } class quizAppScreenState extends State<quizAppScreen> {   String? _selectedValue1;   String? _selectedValue2;   String? _selectedValue3;   int _secondsRemaining = 20;   late Timer _timer;   @override   void initState() {     super.initState();     startTimer();   }   void startTimer() {     _timer = Timer.periodic(Duration(seconds: 1), (timer) {       setState(() {         if (_secondsRemaining > 0) {     ...

High level Flutter Code snippet | Learn Flutter with real-time App

 Create EVM Pad Application: import 'package:flutter/material.dart'; void main() {   runApp(EVMPadApp()); } class EVMPadApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return MaterialApp(       title: 'EVM Pad',       home: EVMHomePage(),     );   } } class EVMHomePage extends StatefulWidget {   @override   _EVMHomePageState createState() => _EVMHomePageState(); } class _EVMHomePageState extends State<EVMHomePage> {   final List<Candidate> candidates = [     Candidate('Indian National Congress', 'assets/images/congress.png'),     Candidate('Bjp', 'assets/images/bjp.png'),     Candidate('Aap', 'assets/images/aap.png'),     Candidate('Bsp', 'assets/images/bsp.png'),   ];   void showResultsDialog(BuildContext context) {     int totalVotes =     candidates.fold(0, (sum, candidate) =...

Advance Flutter Code Snippet | Learn Flutter by Code

 Dropdownlist Example in Flutter: import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; class DropdownDemo extends StatefulWidget {   const DropdownDemo({Key? key}) : super(key: key);   @override   State<DropdownDemo> createState() => _DropdownDemoState(); } class _DropdownDemoState extends State<DropdownDemo> {   String dropdownValue = 'Area of circle';   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text("DDDD")),       body: Center(         child: Column(           children: [             SizedBox(               height: 50,             ),             // Step 2.             DropdownButton<String>(   ...