Created
May 1, 2023 13:23
-
-
Save rubywai/4f8a19f97705a990b113ecb446c352a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:developer'; | |
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); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
leading: const Icon(Icons.info, color: Colors.white,), | |
title: const Text('My Flutter apps'), | |
actions: const [ | |
Icon(Icons.settings), | |
Icon(Icons.add, size: 40,) | |
], | |
centerTitle: true, | |
), | |
body: SingleChildScrollView( | |
child: Column( | |
children: [ | |
Image.asset('assets/cat.jpg', | |
width: 300, | |
height: 300, | |
fit: BoxFit.fitWidth, | |
), | |
], | |
), | |
), | |
floatingActionButton: FloatingActionButton( | |
onPressed: (){ | |
log('Click the floating action button'); | |
}, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment