Snippets Collections
                Container(
                  height: SizeConfig.safeBlockVertical * 24,
                  width: SizeConfig.safeBlockHorizontal * 45,
                  padding: EdgeInsets.only(
                      left: SizeConfig.safeBlockHorizontal * 5,
                      right: SizeConfig.safeBlockHorizontal * 4,
                      bottom: SizeConfig.safeBlockVertical * 2),
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(20),
                      color: Colors.white,
                      gradient: RadialGradient(
                          focalRadius: 100,
                          radius: 1.5,
                          center: Alignment.bottomLeft,
                          colors: [
                            colorStyles["maslowGreen"]!.withOpacity(0.65),
                            colorStyles["maslowGreen"]!.withOpacity(0.65),
                          ],
                          stops: [
                            0.0,
                            1.0
                          ])),
                  child: _collectionName(),
                ),
InputDecoration(
   isDense: true,
   prefixIcon:Text("\$"),
   prefixIconConstraints: BoxConstraints(minWidth: 0, minHeight: 0),
),
RichText(
  text: TextSpan(
    text: 'Hello ',
    style: DefaultTextStyle.of(context).style,
    children: const <TextSpan>[
      TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold)),
      TextSpan(text: ' world!'),
    ],
  ),
)
@override
Widget build(BuildContext context) {

  return new FutureBuilder<User>(
      future: userInfo,
      builder: (BuildContext context, AsyncSnapshot<User> snapshot) 
    {
      switch(snapshot.connectionState) {
        case ConnectionState.none:
          _showDialog(context);
          return Container();
        case ConnectionState.waiting:
          return new Center(
            child: new CircularProgressIndicator());
        case ConnectionState.active:
          return new Text('');
        case ConnectionState.done:
          if(snapshot.hasError) {
            error = snapshot.error;
            _showDialog(context);
            return Container();
          } else {
            return Container();
          }
      }
  });
import 'dart:async';
import 'dart:isolate';
main() async {
  var receivePort = new ReceivePort();
  await Isolate.spawn(echo, receivePort.sendPort);
// The 'echo' isolate sends it's SendPort as the first message
  var sendPort = await receivePort.first;
var msg = await sendReceive(sendPort, "bye");
  print('received $msg');
  msg = await sendReceive(sendPort, "hello");
  print('received $msg');
}
// the entry point for the isolate
echo(SendPort sendPort) async {
  // Open the ReceivePort for incoming messages.
  var port = new ReceivePort();
// Notify any other isolates what port this isolate listens to.
  sendPort.send(port.sendPort);
await for (var msg in port) {
    var data = msg[0];
    SendPort replyTo = msg[1];
    replyTo.send(data);
    if (data == "hello") port.close();
  }
}
/// sends a message on a port, receives the response,
/// and returns the message
Future sendReceive(SendPort port, msg) {
  ReceivePort response = new ReceivePort();
  port.send([msg, response.sendPort]);
  return response.first;
}
Future<String> readBase64(String filepath) async {
  File file = File(await getFilePath(filepath));
  String fileContent = await file.readAsString();
  return (fileContent);
}
DatabaseReference userRef = FirebaseDatabase.instance.reference().child("users");
userRef.child(value.user.uid).set(userDataMap);
    
    Row(
     children: [
                Flexible(
                  child: Text('Add long text here',
                  maxLines: 1,
                  softWrap: false,
                  overflow: TextOverflow.fade,
                  ),
                ),
              ],
            )
    
ElevatedButton(
      child: Text('Button'),
      onPressed: () {},
      style: ElevatedButton.styleFrom({
           Color primary, // set the background color 
           Color onPrimary, 
           Color onSurface, 
           Color shadowColor, 
           double elevation, 
           TextStyle textStyle, 
           EdgeInsetsGeometry padding, 
           Size minimumSize, 
           BorderSide side, 
           OutlinedBorder shape, 
           MouseCursor enabledMouseCursor, 
           MouseCursor disabledMouseCursor, 
           VisualDensity visualDensity, 
           MaterialTapTargetSize tapTargetSize, 
           Duration animationDuration, 
           bool enableFeedback
     }),
),
Scaffold(
      appBar: AppBar(),
      body: Align(
        alignment: Alignment.topCenter,
        child: LayoutBuilder(
          builder: (BuildContext context, BoxConstraints constraints) {
            return Container(
              height: constraints.maxHeight / 2,
              width: MediaQuery.of(context).size.width / 2,
              color: Colors.red,
            );
          },
        ),
      ),
    );
TextField(
 enabled: false, // to trigger disabledBorder
 decoration: InputDecoration(
   filled: true,
   fillColor: Color(0xFFF2F2F2),
   focusedBorder: OutlineInputBorder(
     borderRadius: BorderRadius.all(Radius.circular(4)),
     borderSide: BorderSide(width: 1,color: Colors.red),
   ),
   disabledBorder: OutlineInputBorder(
     borderRadius: BorderRadius.all(Radius.circular(4)),
     borderSide: BorderSide(width: 1,color: Colors.orange),
   ),
   enabledBorder: OutlineInputBorder(
     borderRadius: BorderRadius.all(Radius.circular(4)),
     borderSide: BorderSide(width: 1,color: Colors.green),
   ),
   border: OutlineInputBorder(
     borderRadius: BorderRadius.all(Radius.circular(4)),
     borderSide: BorderSide(width: 1,)
   ),
   errorBorder: OutlineInputBorder(
     borderRadius: BorderRadius.all(Radius.circular(4)),
     borderSide: BorderSide(width: 1,color: Colors.black)
   ),
   focusedErrorBorder: OutlineInputBorder(
     borderRadius: BorderRadius.all(Radius.circular(4)),
     borderSide: BorderSide(width: 1,color: Colors.yellowAccent)
   ),
   hintText: "HintText",
   hintStyle: TextStyle(fontSize: 16,color: Color(0xFFB3B1B1)),
   errorText: snapshot.error,
 ),
 controller: _passwordController,
 onChanged: _authenticationFormBloc.onPasswordChanged,
                            obscureText: false,
),
class AppColors {
  static MaterialColor hex(String hex) =>
      AppColors._factoryColor(AppColors._getColorHexFromStr(hex));

  static MaterialColor _factoryColor(int color) {
    return MaterialColor(color, <int, Color>{
      50: Color(color),
      100: Color(color),
      200: Color(color),
      300: Color(color),
      400: Color(color),
      500: Color(color),
      600: Color(color),
      700: Color(color),
      800: Color(color),
      900: Color(color),
    });
  }

  static int _getColorHexFromStr(String colorStr) {
    colorStr = "FF" + colorStr;
    colorStr = colorStr.replaceAll("#", "");
    int val = 0;
    int len = colorStr.length;
    for (int i = 0; i < len; i++) {
      int hexDigit = colorStr.codeUnitAt(i);
      if (hexDigit >= 48 && hexDigit <= 57) {
        val += (hexDigit - 48) * (1 << (4 * (len - 1 - i)));
      } else if (hexDigit >= 65 && hexDigit <= 70) {
        // A..F
        val += (hexDigit - 55) * (1 << (4 * (len - 1 - i)));
      } else if (hexDigit >= 97 && hexDigit <= 102) {
        // a..f
        val += (hexDigit - 87) * (1 << (4 * (len - 1 - i)));
      } else {
        val = 0xFFFFFFFF;
      }
    }
    return val;
  }
}

// Example: In your app
// ...
class MyExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
    	height: 100.0,
      	width: 100.0,
      	decoration: BoxDecoration(
    		color: AppColors.hex('#000000'),	
    ),
    );
  }
}
Column( 
  crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ Container( child: Text('${payment.name}',textAlign: TextAlign.left,), color: Colors.redAccent, ), ...... )
 decoration: BoxDecoration(
          border: Border(
            top: BorderSide(width: 16.0, color: Colors.lightBlue.shade600),
            bottom: BorderSide(width: 16.0, color: Colors.lightBlue.shade900),
          ),
          color: Colors.white,
        ),
extension StringExtension on String {
    String capitalize() {
      return "${this[0].toUpperCase()}${this.substring(1)}";
    }
}
appBar: AppBar(
        automaticallyImplyLeading: false,
        title: Text(signedIn ? 'Home' : 'Sign In'),
      ),
Container(
      height: 120.0,
      width: 120.0,
      decoration: BoxDecoration(
        image: DecorationImage(
          image: AssetImage(
              'assets/assets/alucard.jpg'),
          fit: BoxFit.fill,
        ),
        shape: BoxShape.circle,
      ),
    )
const color = const Color(0xffb74093); // Second `const` is optional in assignments.
Text(
  'Hello world',
  style: TextStyle(
    decoration: TextDecoration.underline,
  ),
)
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text('IntrinsicWidth')),
    body: Center(
      child: IntrinsicWidth(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            RaisedButton(
              onPressed: () {},
              child: Text('Short'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('A bit Longer'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('The Longest text button'),
            ),
          ],
        ),
      ),
    ),
  );
}
try {
      final result = await InternetAddress.lookup('google.com');
      if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
          print(' connected');
      }
    } on SocketException catch (_) {
      //NOT connected to the internet
      print('not connected');
    }
  class MyBlinkingButton extends StatefulWidget {
    @override
    _MyBlinkingButtonState createState() => _MyBlinkingButtonState();
  }

  class _MyBlinkingButtonState extends State<MyBlinkingButton>
      with SingleTickerProviderStateMixin {
    AnimationController _animationController;

    @override
    void initState() {
      _animationController =
          new AnimationController(vsync: this, duration: Duration(seconds: 1));
      _animationController.repeat(reverse: true);
      super.initState();
    }

    @override
    Widget build(BuildContext context) {
      return FadeTransition(
        opacity: _animationController,
        child: MaterialButton(
          onPressed: () => null,
          child: Text("Text button"),
          color: Colors.green,
        ),
      );
    }

    @override
    void dispose() {
      _animationController.dispose();
      super.dispose();
    }
  }
List<String> feed = List();

feed.add("AAAA");
feed.add("BBBB");
feed.add("CCCC");

ListView.builder(
  itemCount: feed.length,
  itemBuilder: (context, index) {
    return ListTile(title: feed[feed.length - 1 -index]);
  },
);
import 'dart:math';

void main() {
  print(getRandomString(5));  // 5GKjb
  print(getRandomString(10)); // LZrJOTBNGA
  print(getRandomString(15)); // PqokAO1BQBHyJVK
}

const _chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890';
Random _rnd = Random();

String getRandomString(int length) => String.fromCharCodes(Iterable.generate(
    length, (_) => _chars.codeUnitAt(_rnd.nextInt(_chars.length))));
import 'dart:io';
import 'package:exif/exif.dart';
import 'package:image/image.dart' as img;

Future<File> fixExifRotation(String imagePath) async {
    final originalFile = File(imagePath);
    List<int> imageBytes = await originalFile.readAsBytes();

    final originalImage = img.decodeImage(imageBytes);

    final height = originalImage.height;
    final width = originalImage.width;

    // Let's check for the image size
    // This will be true also for upside-down photos but it's ok for me
    if (height >= width) {
      // I'm interested in portrait photos so
      // I'll just return here
      return originalFile;
    }

    // We'll use the exif package to read exif data
    // This is map of several exif properties
    // Let's check 'Image Orientation'
    final exifData = await readExifFromBytes(imageBytes);

    img.Image fixedImage;

    if (height < width) {
      logger.logInfo('Rotating image necessary');
      // rotate
      if (exifData['Image Orientation'].printable.contains('Horizontal')) {
        fixedImage = img.copyRotate(originalImage, 90);
      } else if (exifData['Image Orientation'].printable.contains('180')) {
        fixedImage = img.copyRotate(originalImage, -90);
      } else if (exifData['Image Orientation'].printable.contains('CCW')) {
        fixedImage = img.copyRotate(originalImage, 180);
      } else {
        fixedImage = img.copyRotate(originalImage, 0);
      }
    }

    // Here you can select whether you'd like to save it as png
    // or jpg with some compression
    // I choose jpg with 100% quality
    final fixedFile =
        await originalFile.writeAsBytes(img.encodeJpg(fixedImage));

    return fixedFile;
  }
Color color = new Color(0x12345678);
String colorString = color.toString(); // Color(0x12345678)
String valueString = colorString.split('(0x')[1].split(')')[0]; // kind of hacky..
int value = int.parse(valueString, radix: 16);
Color otherColor = new Color(value);
//I think your understanding of Promises and async/await is not correct.
//When you make a function async, the await keyword before a promise make sure
//that code execution will pause until the promise fulfilled or rejected. 
//Your code can be simplified:

var currentPromise;

async function asyncFunc(promise){
    // Do some code here
    return await promise;
}

function anotherFunction(){
    asyncFunc(currentPromise);
}
//When we are calling return await promise, the execution engine waits in a
//non-blocking way until the promise fulfilled or rejected, and then it returns 
//the output to the anotherFunction function.
const placeholderServices = [
  PlaceholderService(
    name: 'Place Kitten',
    description:
        'Use the Internet first-class citizens as placeholders for your Website.',
    url: 'https://placekitten.com',
    pictureUrl: 'https://placekitten.com/1024/768',
    tags: ['Fun', 'Grayscale'],
  ),
  PlaceholderService(
    name: 'Fill Murray',
    description:
        'Iconic pictures of Bill Murray. Also by the same author: PlaceCage and Steven SeGallery.',
    url: 'http://www.fillmurray.com',
    pictureUrl: 'http://www.fillmurray.com/1200/900',
    tags: ['Fun', 'Grayscale', 'Open-source'],
  ),
  PlaceholderService(
    name: 'PlaceIMG',
    description:
        'Returns stock photos for a given theme, like "Architecture", "Tech" or "People". Also support sepia filter.',
    url: 'http://placeimg.com',
    pictureUrl: 'http://placeimg.com/1200/900/arch',
    tags: ['Stock photo', 'Grayscale', 'Sepia', 'Themes'],
  ),
  PlaceholderService(
    name: 'Bacon Mockup',
    description:
        'Bacon images, but not only. Also on display: briskets, pulled pork, drumsticks, ribs, etc.',
    url: 'https://baconmockup.com',
    pictureUrl: 'https://baconmockup.com/1200/900',
    tags: ['Fun'],
  ),
  PlaceholderService(
    name: 'Placemat',
    description:
        'Stock images categorized in 3 themes: "People", "Places" and "Things. Various options of customization: text, overlay, random seed.',
    url: 'https://placem.at',
    pictureUrl: 'https://placem.at/things?w=1200&h=900',
    tags: ['Stock photo', 'Text', 'Themes', 'Overlay'],
  ),
  PlaceholderService(
    name: 'Dynamic Dummy Image Generator',
    description:
        'More developer-oriented, this service returns plain mono-color images. Lots of handy options including shortcuts for different screen or ads resolutions.',
    url: 'https://dummyimage.com',
    pictureUrl: 'https://dummyimage.com/1200x900/bada55/ffffff',
    tags: ['Technical', 'Text', 'Formats'],
  ),
  PlaceholderService(
    name: 'lorempixel',
    description:
        'Another stock photo placeholder service. Note the "Abstract" category because sometimes you just want your image to represent nothing.',
    url: 'http://lorempixel.com',
    pictureUrl: 'http://lorempixel.com/1200/900/sports',
    tags: ['Stock photo', 'Text', 'Grayscale', 'Themes'],
  ),
];
Widget _signInButton() {




   return OutlineButton(


     splashColor: Colors.grey,


     onPressed: () {},


     shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(40)),


     highlightElevation: 0,


     borderSide: BorderSide(color: Colors.grey),


     child: Padding(


       padding: const EdgeInsets.fromLTRB(0, 10, 0, 10),


       child: Row(


         mainAxisSize: MainAxisSize.min,


         mainAxisAlignment: MainAxisAlignment.center,


         children: <Widget>[


           Image(image: AssetImage("assets/google_logo.png"), height: 35.0),


           Padding(


             padding: const EdgeInsets.only(left: 10),


             child: Text(


               'Sign in with Google',


               style: TextStyle(


                 fontSize: 20,


                 color: Colors.grey,


               ),


             ),


           )


         ],


       ),


     ),


   );


 }


Text('Click \u{2795} to add')
RichText( text: TextSpan( children: [ TextSpan( text: "Click ", ), WidgetSpan( child: Icon(Icons.add, size: 14), ), TextSpan( text: " to add", ), ], ), )
Center(
          child: new Container(
            padding: const EdgeInsets.all(8.0),
            height: 500.0,
            width: 500.0,
            child: new Stack(
              overflow: Overflow.visible,
              children: <Widget>[
                new Icon(Icons.pages, size: 36.0, color: Colors.red),
                new Positioned(
                  left: 20.0,
                  child: new Icon(Icons.pages, size: 36.0, color: Colors.green),
                ),
 
              ],
            ),
          ),
    )
main() {
  List customers = [];
  customers.add(Customer('Jack', 23));
  customers.add(Customer('Adam', 27));
  customers.add(Customer('Katherin', 25));

  customers.sort((a, b) => a.age.compareTo(b.age));
  print('Sort by Age: ' + customers.toString());

  customers.sort((a, b) => a.name.compareTo(b.name));
  print('Sort by Name: ' + customers.toString());
}
//Inside main.dart
return MaterialApp(
 initialRoute: WelcomeScreen.id,
 routes: {
   WelcomeScreen.id: (context) => WelcomeScreen(),
   LoginScreen.id: (context) => LoginScreen(),
   RegistrationScreen.id: (context) => RegistrationScreen(),
   ChatScreen.id: (context) => ChatScreen(),
 },
);

//Inside **** Class:
static const String id = '****';

//Inside onPressed
  onTap: () => Navigator.pushNamed(context, VideoScreen.id, arguments: {
                'chapter_name': 'Chapter $index',
              }),
              
 // In receiving side
 final  Map<String, String> received = ModalRoute.of(context).settings.arguments;
    final chapterName = received['chapter_name'];
 
import 'package:dynamicmathapp/services/auth.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:dynamicmathapp/models/user.dart';
import 'package:cloud_firestore/cloud_firestore.dart';

class Home extends StatelessWidget {
  final AuthService _auth = AuthService();
  final ref = FirebaseDatabase.instance.reference();

  @override
  Widget build(BuildContext context) {
    User user = Provider.of<User>(context);

    return Scaffold(
      backgroundColor: Colors.brown[50],
      appBar: AppBar(
        title: Text('Welcome'),
        backgroundColor: Colors.brown[400],
        elevation: 0.0,
        actions: <Widget>[
          FlatButton.icon(
            icon: Icon(Icons.person),
            label: Text('logout'),
            onPressed: () async {
              await _auth.signOut();
            },
          ),
        ],
      ),
      body: Column(
        children: <Widget>[
          Container(
            child: Text(
              'ID:' + user.uid + 'email:' + user.email,
            ),
          ),
          RaisedButton(
            child: Text('Create Record'),
            onPressed: () {
              createRecord();
            },
          ),
          RaisedButton(
            child: Text('View Record'),
            onPressed: () {
              getData();
            },
          ),
          RaisedButton(
            child: Text('Update Record'),
            onPressed: () {
              updateData();
            },
          ),
          RaisedButton(
            child: Text('Delete Record'),
            onPressed: () {
              deleteData();
            },
          ),
        ],
      ),
    );
  }

  void createRecord() {
    ref
        .child('videos')
        .child('class_10')
        .child('chapter_1')
        .set([
      {"length": "1:3333", "title": "Introduction 1.1"},
      {"length": "2:30", "title": "Introduction 1.2"}
    ]);
  }

  void getData() {
    ref
        .child('videos')
        .child('class_10')
        .child('chapter_1')
        .once()
        .then((DataSnapshot data) {
      print(data..value);
      print(data.key);
    });
  }

  void updateData() {}

  void deleteData() {}
}
final ref = FirebaseDatabase.instance.reference();

 void getData() {
    ref
        .child('videos')
        .child('class_10')
        .child('chapter_1')
        .once()
        .then((DataSnapshot data) {
      print(data.value);
      print(data.key);
    });
  }
  
    void createRecord() {
    ref
        .child('videos')
        .child('class_10')
        .child('chapter_1')
        .set([
      {"length": "1:3333", "title": "Introduction 1.1"},
      {"length": "2:30", "title": "Introduction 1.2"}
    ]);
  }
   final databaseReference = Firestore.instance;

 
 void createRecord() async {
    Map data = {'length': '1:30:20', 'position': '1', 'title': 'Introduction 3.'};
    await databaseReference
        .collection("class_10")
        .document('chapter_4')
        .collection('videos')
        .document()
        .setData(
           data
);

//    await databaseReference.collection("classes")
//        .document('10')
//        .collection('chapter')
//        .document('1')
//    .collection('videos')
//    .document('1')
//        .setData({
//      'title': 'Introduction 1 Sets',
//      'length': '10:20'
//    });
  }

  void getData() {
    databaseReference
        .collection("class_10")
        .document('chapter_1')
        .collection('videos')
        .getDocuments()
        .then((QuerySnapshot snapshot) {
      snapshot.documents.forEach((f) => print('${f.data}}'));
    });
  }

  void updateData() {
    try {
      databaseReference
          .collection('books')
          .document('1')
          .updateData({'description': 'Head First Flutter'});
    } catch (e) {
      print(e.toString());
    }
    databaseReference
        .collection("classes")
        .document('10')
        .collection('chapter')
        .document('1')
        .collection('videos');
  }

  void deleteData() {
    try {
      databaseReference.collection('books').document('1').delete();
    } catch (e) {
      print(e.toString());
    }
  }
bool isAnagram(String str1, String str2) {
  String normalize(String str) => (str
          .toLowerCase()
          .replaceAll(RegExp(r'[^a-z0-9]', caseSensitive: false), '')
          .split('')
            ..sort())
      .join('');
  return normalize(str1) == normalize(str2);
}
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text('IntrinsicWidth')),
    body: Center(
      child: IntrinsicHeight(
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            RaisedButton(
              onPressed: () {},
              child: Text('Short'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('A bit Longer'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('The Longest text button'),
            ),
          ],
        ),
      ),
    ),
  );
}
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text('IntrinsicWidth')),
    body: Center(
      child: IntrinsicWidth(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            RaisedButton(
              onPressed: () {},
              child: Text('Short'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('A bit Longer'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('The Longest text button'),
            ),
          ],
        ),
      ),
    ),
  );
}
import 'package:flutter/material.dart';

void main() {
  runApp(
    new MaterialApp(
      title: 'Hello World App',
      home: new myApp(),
    )
  );
}

class myApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('Hello World App'),
      ),
      body: new Center(
        child: new Text(
          'Hello, world!'
        ),
      ),
    );
  }
}
Text("Border test",
    style: TextStyle(
      inherit: true,
      fontSize: 48.0,
      color: Colors.pink,
      shadows: [
        Shadow( // bottomLeft
          offset: Offset(-1.5, -1.5),
          color: Colors.white
        ),
        Shadow( // bottomRight
          offset: Offset(1.5, -1.5),
          color: Colors.white
        ),
        Shadow( // topRight
          offset: Offset(1.5, 1.5),
          color: Colors.white
        ),
        Shadow( // topLeft
          offset: Offset(-1.5, 1.5),
          color: Colors.white
        ),
      ]
    ),
);
String capitalize(String s) {
  if (s == null || s.isEmpty) {
    return s;
  }
  return s.length < 1 ? s.toUpperCase() : s[0].toUpperCase() + s.substring(1);
}
star

Fri Sep 24 2021 02:03:52 GMT+0000 (UTC)

#dart
star

Sat Sep 18 2021 00:29:49 GMT+0000 (UTC) https://stackoverflow.com/questions/58819979/is-there-a-way-to-create-a-text-field-with-a-prefix-that-is-always-visible-in-fl

#dart #flutter
star

Tue Sep 14 2021 15:43:06 GMT+0000 (UTC) https://api.flutter.dev/flutter/widgets/RichText-class.html

#dart #flutter
star

Tue Sep 14 2021 04:23:19 GMT+0000 (UTC) https://stackoverflow.com/questions/54135078/how-to-solve-error-running-pod-install-in-flutter-on-mac

#dart #flutter
star

Fri Aug 27 2021 05:58:23 GMT+0000 (UTC) https://medium.com/flutter-community/flutter-threading-5c3a7b0c065f

#flutter #dart
star

Fri Aug 27 2021 05:28:55 GMT+0000 (UTC) https://medium.com/flutterdevs/threading-in-flutter-e5b84c7d8d31

#flutter #dart #threading
star

Mon Jul 26 2021 06:39:40 GMT+0000 (UTC) https://stackoverflow.com/questions/51679269/waiting-for-another-flutter-command-to-release-the-startup-lock

#dart
star

Sun Jul 04 2021 12:02:09 GMT+0000 (UTC) https://gist.github.com/matteocrippa/3a8b84c7b49c10bc070e58a66860e83f#file-flutter-md

#flutter #dart
star

Sun Jul 04 2021 12:00:39 GMT+0000 (UTC) https://github.com/Temidtech/Flutter-Cheat-Sheet/blob/master/README.md

#dart #flutter
star

Fri Jun 18 2021 08:38:14 GMT+0000 (UTC)

#dart
star

Fri May 14 2021 10:36:36 GMT+0000 (UTC) https://mightytechno.com/flutter-wrap-text-on-overflow/

#dart
star

Tue May 11 2021 12:01:16 GMT+0000 (UTC) https://stackoverflow.com/questions/66835173/how-to-change-background-color-of-elevated-button-in-flutter-from-function

#dart
star

Sun May 02 2021 14:29:08 GMT+0000 (UTC) https://stackoverflow.com/questions/54156365/sizing-a-container-to-exact-half-the-screen-size-in-flutter

#dart
star

Sat Apr 24 2021 17:17:34 GMT+0000 (UTC) https://medium.com/flutterdevs/chip-widgets-in-flutter-7a2d3d34597c

#flutt #dart #chips
star

Fri Apr 23 2021 17:34:56 GMT+0000 (UTC) https://stackoverflow.com/questions/50122394/not-able-to-change-textfield-border-color

#dart #flutter
star

Fri Apr 23 2021 02:25:58 GMT+0000 (UTC)

#dart #flutter
star

Sat Apr 10 2021 06:33:52 GMT+0000 (UTC)

#dart #flutter
star

Thu Mar 25 2021 15:10:11 GMT+0000 (UTC) https://fluttercentral.com/Articles/Post/1056/How_to_add_a_border_to_only_one_part_of_the_container_in_Flutter

#dart #flutter
star

Mon Mar 22 2021 10:50:27 GMT+0000 (UTC) https://stackoverflow.com/questions/29628989/how-to-capitalize-the-first-letter-of-a-string-in-dart

#dart #flutter
star

Wed Mar 17 2021 13:56:41 GMT+0000 (UTC) https://github.com/flutter/flutter/issues/67277

#dart #flutter
star

Tue Mar 16 2021 16:29:48 GMT+0000 (UTC) https://stackoverflow.com/questions/52211283/inserting-image-into-a-container-flutter-app

#dart #flutter
star

Mon Mar 15 2021 10:38:42 GMT+0000 (UTC) https://stackoverflow.com/questions/50081213/how-do-i-use-hexadecimal-color-strings-in-flutter

#dart #flutter
star

Thu Mar 11 2021 14:20:12 GMT+0000 (UTC) https://stackoverflow.com/questions/50614661/how-to-underline-text-in-flutter

#dart #flutter
star

Mon Mar 08 2021 13:00:55 GMT+0000 (UTC) https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e

#dart #flutter
star

Fri Mar 05 2021 16:23:34 GMT+0000 (UTC) https://pub.dev/

#dart
star

Fri Dec 11 2020 13:38:42 GMT+0000 (UTC)

#dart
star

Fri Dec 04 2020 20:33:23 GMT+0000 (UTC) https://stackoverflow.com/questions/51733044/flutter-blinking-button

#dart
star

Fri Oct 30 2020 01:10:04 GMT+0000 (UTC) https://stackoverflow.com/questions/57499254/flutter-reversed-listview-start-at-top

#dart
star

Thu Oct 29 2020 18:41:27 GMT+0000 (UTC) https://stackoverflow.com/questions/61919395/how-to-generate-random-string-in-dart

#dart
star

Thu Oct 29 2020 16:33:00 GMT+0000 (UTC) https://stackoverflow.com/questions/60176001/how-to-fix-wrong-rotation-of-photo-from-camera-in-flutter

#dart
star

Mon Oct 26 2020 01:08:55 GMT+0000 (UTC) https://stackoverflow.com/questions/49835146/how-to-convert-flutter-color-to-string-and-back-to-a-color

#dart
star

Fri Sep 11 2020 07:50:15 GMT+0000 (UTC)

#dart
star

Sun Aug 23 2020 19:51:15 GMT+0000 (UTC)

#dart
star

Mon Jun 15 2020 12:36:30 GMT+0000 (UTC)

#dart
star

Mon Jun 15 2020 12:36:06 GMT+0000 (UTC) https://pusher.com/tutorials/flutter-listviews

#dart
star

Mon Jun 15 2020 12:35:38 GMT+0000 (UTC)

#dart
star

Mon Jun 15 2020 12:34:47 GMT+0000 (UTC) https://pub.dev/packages/flutter_svg#-readme-tab-

#dart
star

Mon Jun 15 2020 12:34:17 GMT+0000 (UTC) https://www.freewebmentor.com/questions/does-flutter-support-negative-margin

#dart
star

Mon Jun 15 2020 12:33:46 GMT+0000 (UTC) Dart/Flutter List Tutorial with Examples

#dart
star

Mon Jun 15 2020 12:33:08 GMT+0000 (UTC)

#dart
star

Mon Jun 15 2020 12:31:36 GMT+0000 (UTC)

#dart
star

Sun Jun 14 2020 07:37:22 GMT+0000 (UTC)

#dart
star

Sun Jun 14 2020 07:08:20 GMT+0000 (UTC) https://petercoding.com/firebase/2020/02/06/get-started-with-firebase-in-flutter/

#dart
star

Sun Jun 14 2020 03:21:06 GMT+0000 (UTC)

#dart
star

Tue May 12 2020 11:03:36 GMT+0000 (UTC) https://gist.github.com/basselch/51b8a047c5c86355c5859a2e5f198fd0

#dart #flutter
star

Tue May 12 2020 11:02:17 GMT+0000 (UTC) https://stackoverflow.com/questions/48893935/how-to-remove-debug-banner-in-flutter-on-android-emulator

#dart #flutter
star

Tue Apr 28 2020 19:52:02 GMT+0000 (UTC) https://www.30secondsofcode.org/dart/s/is-anagram/

#dart
star

Wed Jan 22 2020 18:43:41 GMT+0000 (UTC) https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e

#dart #flutter #layouts
star

Wed Jan 22 2020 18:35:33 GMT+0000 (UTC) https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e

#dart #flutter #layout
star

Sun Dec 29 2019 19:42:22 GMT+0000 (UTC) https://kodestat.gitbook.io/flutter/flutter-hello-world

#android #dart #flutter #ios #helloworld
star

Thu Dec 26 2019 18:27:15 GMT+0000 (UTC) https://stackoverflow.com/questions/52146269/how-to-decorate-text-stroke-in-flutter

#dart #flutter #howto

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension