Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

ryanlid ryanlid

🎯
Focusing
View GitHub Profile
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Opacity 透明度
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "Opacity不透明度示例",
home: LayoutDemo(),
),
);
}
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Opacity 透明度
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "Opacity不透明度示例",
home: LayoutDemo(),
),
);
}
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Dismissible 滑动删除
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "滑动删除",
home: MyApp(),
),
);
}
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: "按下处理",
home: MyApp(),
));
}
class MyApp extends StatelessWidget {
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Wrap 按宽高自动换行布局
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "Wrap按宽高自动换行布局示例",
home: MyApp(),
),
);
}
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Offstage 控制是否显示组件
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final appTitle = "Offstage控制是否显示组件";
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Baseline 基准线布局
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "Baseline基准线布局示例",
home: LayoutDemo(),
),
);
}
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
Transform 矩阵转换
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: "Transform矩阵转换示例",
home: LayoutDemo(),
));
}
class LayoutDemo extends StatelessWidget {
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
table 表格布局
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "table 表格布局示例",
home: MyApp(),
),
);
}
@ryanlid
ryanlid / main.dart
Last active Feb 16, 2020
GridView 网格布局
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: "GridView 网格布局",
home: MyApp(),
));
}
class MyApp extends StatelessWidget {