Skip to content

Instantly share code, notes, and snippets.

@omarzer0
Created October 10, 2022 20:20
Show Gist options
  • Save omarzer0/684e003b9cae33a289da98052f70047d to your computer and use it in GitHub Desktop.
Save omarzer0/684e003b9cae33a289da98052f70047d to your computer and use it in GitHub Desktop.
Code for the second session for Flutter course in Roqay
import 'package:flutter/material.dart';
// The line below is to stop lint warning "Prefer const with constant constructors"
// ignore_for_file: prefer_const_constructors
void main() {
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 0,
title: Image.asset('images/youtube_logo.png',width: 105,),
iconTheme: IconThemeData(color: Colors.grey[700]),
actions: [
IconButton(icon: Icon(Icons.videocam),onPressed: (){},),
IconButton(icon: Icon(Icons.search),onPressed: (){},),
IconButton(icon: Icon(Icons.account_circle),onPressed: (){},),
],
),
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
selectedItemColor: Colors.red,
unselectedItemColor: Colors.grey[700],
items: const [
BottomNavigationBarItem(icon: Icon(Icons.home),label: "Home"),
BottomNavigationBarItem(icon: Icon(Icons.explore),label: "Explore"),
BottomNavigationBarItem(icon: Icon(Icons.subscriptions),label: "Subscriptions"),
BottomNavigationBarItem(icon: Icon(Icons.mail),label: "Inbox"),
BottomNavigationBarItem(icon: Icon(Icons.video_library),label: "Library"),
BottomNavigationBarItem(icon: Icon(Icons.file_download_outlined),label: "Download"),
],
),
),
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment