当前位置:网站首页>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 :
边栏推荐
- 蓝桥杯单片机省赛第七届
- 蓝桥杯单片机省赛第十一届
- Welcome the winter vacation multi school league game 2 partial solution (B, C, D, F, G, H)
- Didi open source Delta: AI developers can easily train natural language models
- Hands on deep learning (II) -- multi layer perceptron
- 【leetcode】34. Find the first and last positions of elements in a sorted array
- ImageAI安装
- Finally got byte offer. The 25-year-old inexperienced perception of software testing is written to you who are still confused
- go 变量与常量
- QT designer plug-in implementation of QT plug-in
猜你喜欢
PR zero foundation introductory guide note 2
接口调试工具模拟Post上传文件——ApiPost
NLog use
初识string+简单用法(二)
Nacos 配置中心整体设计原理分析(持久化,集群,信息同步)
Finally got byte offer. The 25-year-old inexperienced perception of software testing is written to you who are still confused
go 包的使用
Use of go package
Interface debugging tool simulates post upload file - apipost
The 11th Blue Bridge Cup single chip microcomputer provincial competition
随机推荐
【无线图传】基于FPGA的简易无线图像传输系统verilog开发,matlab辅助验证
Déchirure à la main - tri
PR zero foundation introductory guide note 2
[mv-3d] - multi view 3D target detection network
蓝桥杯单片机省赛第七届
Go language introduction
傅里叶级数
SQL: common SQL commands
【leetcode】34. Find the first and last positions of elements in a sorted array
VS2010 plug-in nuget
Go variables and constants
[ibdfe] matlab simulation of frequency domain equalization based on ibdfe
Vite: scaffold assembly
[personal notes] PHP common functions - custom functions
C language: examples of logical operation and judgment selection structure
Where can I buy cancer insurance? Which product is better?
Go语言介绍
The original author is out! Faker. JS has been controlled by the community..
Jetpack's livedata extension mediatorlivedata
BiShe cinema ticket purchasing system based on SSM