当前位置:网站首页>Fluent icon demo
Fluent icon demo
2022-07-02 03:58:00 【Snow pine】
Catalog
Program entrance :C:\Users\user\StudioProjects\myflutter\lib\main.dart
Icon usage example :C:\Users\user\StudioProjects\myflutter\lib\basic\1\icon.dart
Sketch Map :
Program entrance :C:\Users\user\StudioProjects\myflutter\lib\main.dart
import 'package:flutter/material.dart';
// import 'basic/1/text.dart';
import 'basic/1/icon.dart';
String mytitle = ' home page ';
void main(List<String> args) {
return runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
// 1. First , Program entry flutter Top level components of
return MaterialApp(
title: "hello myflatter", // Title Applied in task manager ;
// The global theme style of the application
theme: ThemeData(
primarySwatch: Colors.blueGrey,
// fontFamily: 'Zhi_Mang_Xing', // Global font settings
),
home: my_flutter(title: mytitle), // The main content of the application
debugShowCheckedModeBanner: false // Whether the application displays the main upper corner debugging mark
);
}
}
// ignore: camel_case_types
class my_flutter extends StatelessWidget {
const my_flutter({Key? key, required this.title}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
// 2. secondly , Program entry flutter Scaffold components
return Scaffold(
// The head component of the application
appBar: AppBar(
// The middle header of the application
title: Text(title),
// leading It is the icon in the upper corner of the main
leading: IconButton(
onPressed: () {
print('This is home!');
},
icon: const Icon(Icons.view_headline),
),
// The icon group on the right side of the application header ( Multiple icons )
actions: [
// Icon 1
IconButton(
onPressed: () {
print('This is share!');
},
icon: const Icon(Icons.share),
),
// Icon 2
Padding(
padding: const EdgeInsets.symmetric(horizontal: 0),
child: IconButton(
icon: const Icon(Icons.search),
onPressed: () {
print('This is search!');
},
),
),
// Icon 3
IconButton(
onPressed: () {
print('This is more!');
},
icon: const Icon(Icons.more_vert),
)
],
),
// 3. This is the main component entry of the entire application content !!
body: const IconDemo(),
);
}
}
Icon usage example :C:\Users\user\StudioProjects\myflutter\lib\basic\1\icon.dart
import 'package:flutter/material.dart';
class IconDemo extends StatelessWidget {
const IconDemo({Key? key}) : super(key: key);
/// Icon Icon components
/// Flutter Icon Library in
/// Icon(Icons. Specific name )
///
/// Icon address :https://fonts.google.com/icons?selected=Material+Icons
@override
Widget build(BuildContext context) {
return Center(
child: Column(
children: const [
Text(
'Icon Icon ',
style: TextStyle(
fontSize: 30,
color: Colors.deepOrange,
),
),
Icon(Icons.home), // Icon
Icon(Icons.settings), // Icon
Icon(Icons.favorite), // Icon
],
),
);
}
}
Program execution effect :
Flutter Chinese website provides online books , Study Flutter You don't need to buy books to study , Portal :
边栏推荐
- go 语言命名规范
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验1 LED 闪烁实验(学习笔记)
- 蓝桥杯单片机第四届省赛
- The 7th Blue Bridge Cup single chip microcomputer provincial competition
- The first game of the 12th Blue Bridge Cup single chip microcomputer provincial competition
- Network connection mode of QT
- 蓝桥杯单片机省赛第十届
- Oracle common SQL
- Fourier series
- High performance and low power cortex-a53 core board | i.mx8m Mini
猜你喜欢
蓝桥杯单片机省赛第七届
Basic operations of MySQL database (based on tables)
The original author is out! Faker. JS has been controlled by the community..
2022-07-01:某公司年会上,大家要玩一食发奖金游戏,一共有n个员工, 每个员工都有建设积分和捣乱积分, 他们需要排成一队,在队伍最前面的一定是老板,老板也有建设积分和捣乱积分, 排好队后,所有
Set vscode. When double clicking, the selected string includes the $symbol - convenient for PHP operation
蓝桥杯单片机省赛第八届
It took me only 3 months to jump out of the comfort zone and become an automated test engineer for 5 years
The 9th Blue Bridge Cup single chip microcomputer provincial competition
QT designer plug-in implementation of QT plug-in
高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
随机推荐
Account management of MySQL
【leetcode】81. Search rotation sort array II
Opencv learning example code 3.2.4 LUT
Pandora IOT development board learning (HAL Library) - Experiment 2 buzzer experiment (learning notes)
Fingertips life Chapter 4 modules and packages
Suggestions on settlement solution of u standard contract position explosion
【力扣刷题】15.三数之和(双指针);17.电话号码的字母组合(递归回溯)
Is the product of cancer prevention medical insurance safe?
蓝桥杯单片机第四届省赛
毕设-基于SSM电影院购票系统
Sorted out an ECS summer money saving secret, this time @ old users come and take it away
藍湖的安裝及使用
蓝桥杯单片机省赛第十一届
ImageAI安装
BiShe cinema ticket purchasing system based on SSM
【leetcode】74. Search 2D matrix
手撕——排序
A thorough understanding of the development of scorecards - the determination of Y (Vintage analysis, rolling rate analysis, etc.)
Basic syntax of unity script (7) - member variables and instantiation
The second game of the 11th provincial single chip microcomputer competition of the Blue Bridge Cup