Skip to content

Instantly share code, notes, and snippets.

@rubywai
Created May 2, 2023 16:22
Show Gist options
  • Select an option

  • Save rubywai/144f30c47cfca222e24fd9e6c3458409 to your computer and use it in GitHub Desktop.

Select an option

Save rubywai/144f30c47cfca222e24fd9e6c3458409 to your computer and use it in GitHub Desktop.
//debug release profile
//assets file binary network
//container
// Material , Cupertino
//Stateless .Stateful
import 'package:flutter/material.dart';
//asset file network memory
void main() {
runApp(const MaterialApp(debugShowCheckedModeBanner: false, home: Home()));
}
class Home extends StatelessWidget {
const Home({Key? key}) : super(key: key);
//positioned
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Stack Lesson'),
),
body: Stack(
clipBehavior: Clip.none,
children: [
Image.network(
'https://cdn.britannica.com/57/151657-131-A74A72C8/Camel-caravan-desert-sand-dunes-Sahara-North.jpg',),
Positioned(
bottom: 10,
right: 10,
child: ElevatedButton.icon(
onPressed: () {},
icon: const Icon(Icons.camera_alt_outlined),
label: const Text('Change Photo')),
),
Positioned(
top: 10,
right: 10,
child: IconButton(
color: Colors.white,
onPressed: (){
}, icon: const Icon(Icons.edit)),
),
const Positioned(
left: 20,
bottom: -80,
child: CircleAvatar(
radius: 80,
backgroundImage: NetworkImage('https://randomuser.me/api/portraits/men/59.jpg',),
))
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment