Flutter

Flutter Network
flutter – android – http.get never works in deployed device / release mode
April 8, 2021
0
, ,
Recently while working & testing on my own app Zbotics (That assist with Robot Voice when to do what to my family member) which has been made by flutter 2, I have found that App loads data using http.get properly in IOS Simulator & real device but it was not working in Android Device at […]
Coding Flutter UI Clone
Flutter:: Chat UI Screen
November 27, 2019
0
lib/main.dart import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:my_app1/chat-ui.dart'; import 'package:flutter/services.dart'; void main() { runApp(ChatUI()); } lib/chat-ui.dart import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'dart:math'; import 'package:my_app1/widgets/category_selector.dart'; import 'package:my_app1/chat-ui-chat-screen.dart'; class User { final int id; final String name; final String imageUrl; User({ this.id, this.name, this.imageUrl, }); } class Message { final User sender; final String […]
Coding Flutter Model
Flutter:: Proposed Folder Structure
November 26, 2019
0
Assets Folder — assets/fonts/— assets/images/ Lib Folder — lib/models— lib/pages— lib/widgets/widgets.dart— lib/routes/routes.dart— lib/utilities/styles.dart
Coding Flutter Model
Flutter::Models
November 26, 2019
0
,
Sample Model class User { final int id; final String name; final String imageUrl; User({ this.id, this.name, this.imageUrl, }); } class Message { final User sender; final String time; // Would usually be type DateTime or Firebase Timestamp in production apps final String text; final bool isLiked; final bool unread; Message({ this.sender, this.time, this.text, this.isLiked, […]
Flutter Navigation / Route
Flutter: Page Controller
November 24, 2019
0
,
lib/main.dart import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; void main() { runApp(MaterialApp( home: MyPageView(), )); } class MyPageView extends StatefulWidget { MyPageView({Key key}) : super(key: key); _MyPageViewState createState() => _MyPageViewState(); } class _MyPageViewState extends State { PageController _pageController; @override void initState() { super.initState(); _pageController = PageController(); } @override void dispose() { _pageController.dispose(); super.dispose(); } @override Widget […]
Coding Flutter List View
Flutter:: Horizontal List View
November 21, 2019
0
,
lib/main.dart import 'package:flutter/material.dart'; void main() { runApp(MyHorizontalSample1()); } class MyHorizontalSample1 extends StatelessWidget{ Container MyArticles(String imageVal, String heading, String subHeading){ return Container( width: 160.0, child: Card( child: Wrap( children: [ Image.asset( 'images/pavlova.jpg' ), ListTile( title: Text(heading), subtitle: Text(subHeading), ), ], ), ), ); } @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, title: 'Flutter Horizontal […]
Flutter Flutter Layout Sample
Flutter:: Positioned
November 20, 2019
0
import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; void main() { runApp(ListViewApp()); } class ListViewApp extends StatelessWidget { @override Widget build(BuildContext context) { final title = 'Basic List'; return MaterialApp( title: title, home: Scaffold( appBar: AppBar( title: Text(title), ), body: ConstrainedBox( constraints: BoxConstraints.tight(Size(double.infinity, 256)), child: Stack( alignment: AlignmentDirectional.center, children: [ Positioned( top: 0.0, child: Icon(Icons.calendar_today, size: 128.0, color: Colors.lightBlueAccent), […]
Coding Flutter Flutter Layout Sample
Flutter:: Column
November 20, 2019
0
, , ,
MainAxisAlignment CrossAxisAlignment Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( padding: const EdgeInsets.all(0.0), color: Colors.cyanAccent, width: 80.0, height: 80.0, ), Container( padding: const EdgeInsets.all(0.0), color: Colors.blueAccent, width: 80.0, height: 80.0, ), Container( padding: const EdgeInsets.all(0.0), color: Colors.orangeAccent, width: 80.0, height: 80.0, ), ], Reference:http://flutterexamples.com/
Coding Flutter Flutter Layout Sample
Flutter:: Column
November 20, 2019
0
, , ,
MainAxisAlignment CrossAxisAlignment Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( padding: const EdgeInsets.all(0.0), color: Colors.cyanAccent, width: 80.0, height: 80.0, ), Container( padding: const EdgeInsets.all(0.0), color: Colors.blueAccent, width: 80.0, height: 80.0, ), Container( padding: const EdgeInsets.all(0.0), color: Colors.orangeAccent, width: 80.0, height: 80.0, ), ], Reference:http://flutterexamples.com/
Flutter Flutter Layout Sample
Flutter: Row
November 20, 2019
0
, ,
MainAxisAlignment CrossAxisAlignment Row( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( padding: const EdgeInsets.all(0.0), color: Colors.cyanAccent, width: 80.0, height: 80.0, ), Container( padding: const EdgeInsets.all(0.0), color: Colors.blueAccent, width: 80.0, height: 80.0, ), Container( padding: const EdgeInsets.all(0.0), color: Colors.orangeAccent, width: 80.0, height: 80.0, ), ], ),