Transparent App bar in Flutter

 Transparent App bar in Flutter

 User Interface (UI)






Code


import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(
MaterialApp(
title: "Transparent App",
debugShowCheckedModeBanner: false,
home: Home_Page(),
),
);

class Home_Page extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
title: Text('Transparent AppBar'),
centerTitle: true,
leading: BackButton(),
actions: [
IconButton(
icon: Icon(Icons.search),
onPressed: () {},
)
],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(bottom: Radius.circular(16)),
),
backgroundColor: Colors.transparent, // Colors.white.withOpacity(0.1),
elevation: 0,
),
body: Image.network(
'https://images.unsplash.com/photo-1497250681960-ef046c08a56e?ixlib='
'rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8NHx8cGxhbnR8ZW58MHx8MHx8&'
'w=1000&q=80',
fit: BoxFit.cover,
width: double.infinity,
height: double.infinity,
),
);
}





Contact Me
Facebook Profile: Asim Irshad Facebook
LinkedIn Profile: Asim Irshad Linked In
GitHub Link:https://github.com/AsimIrshad
Youtube Channel Link: Learn Flutter Now

Comments