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),
                    ),
                    Positioned(
                        top: 2,
                        right: 140,
                        child: CircleAvatar(radius: 16, backgroundColor: Colors.red)),
                  ],
                ),
              ),
      ),
    );
  }
}

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

AndroidManifest.xml

flutter – android – http.get never works in deployed device / release mode

Recently while working & testing on my own app...

Read more

Flutter:: Chat UI Screen

lib/main.dart import 'package:flutter/foundation.d...

Read more

Flutter:: Proposed Folder Structure

Assets Folder — assets/fonts/— assets/...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *