Skip to main content

Posts

Showing posts with the label Flutter

Simple quotes list App using Flutter

import 'package:flutter/cupertino.dart' ; import 'package:flutter/material.dart' ; import 'quotes.dart' ; void main () => runApp( MaterialApp ( home: QuoteList () )) ; class QuoteList extends StatefulWidget { @override _QuoteListState createState () => _QuoteListState () ; } class _QuoteListState extends State<QuoteList> { List<Quote> quotes = [ Quote ( 'Live your life' , 'CNU' ) , Quote ( 'Do what you love' , 'SREENIVAS' ) , Quote ( 'Never Settle' , 'REDDY' ) ] ; Widget quoteTemplate (quote){ return Card ( margin: EdgeInsets . fromLTRB ( 16 , 16 , 16 , 0 ) , child: Padding ( padding: const EdgeInsets . all ( 12.0 ) , child: Column ( crossAxisAlignment: CrossAxisAlignment. stretch , children: <Widget>[ Text ( quote.text , style: TextStyle ( fontSize: 20 , ...

Simple ID card building application using flutter

import 'package:flutter/material.dart' ; void main () => runApp( MaterialApp ( home: NinjaCard () , )) ; class NinjaCard extends StatefulWidget { @override _NinjaCardState createState () => _NinjaCardState () ; } class _NinjaCardState extends State<NinjaCard> { int level = 0 ; @override Widget build (BuildContext context) { return Scaffold ( backgroundColor: Colors. grey [ 900 ] , appBar: AppBar ( title: Text ( 'Ninja ID Card' ) , centerTitle: true, backgroundColor: Colors. grey [ 850 ] , elevation: 0.0 , ) , floatingActionButton: FloatingActionButton ( onPressed: (){ setState(() { level += 1 ; }) ; } , child: Icon (Icons. add ) , backgroundColor: Colors. grey [ 500 ] , ) , body: Padding ( padding: EdgeInsets . fromLTRB ( 30.0 , 40 , 40.0 , 0 ) , child: Column ( crossAxisAlignment: Cross...