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
ClipPath 路径剪裁
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
ClipRect 矩形裁剪
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
ClipRRect 圆角矩形裁剪
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp((MyApp()));
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
CliOval 圆形剪裁
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
RotatedBox 旋转盒子
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MyApp(),
);
}
class MyApp extends StatelessWidget {
@override
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
RadialGradient 环形渐变效果
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "RadizlGradient 环形渐变效果",
home: LayoutDemo(),
),
);
}
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
LinearGradient 线性渐变效果
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: "LinearGradient线性渐变效果",
home: LayoutDemo(),
),
);
}
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
BoxDecoration 装饰盒子
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: "BoxDecoration装饰盒子",
home: LayoutDemo(),
));
}
class LayoutDemo extends StatelessWidget {
@ryanlid
ryanlid / main.dart
Created Feb 16, 2020
BoxDecoration装饰盒子-背景图片
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: "BoxDecoration装饰盒子-背景图片",
home: LayoutDemo(),
));
}
class LayoutDemo extends StatelessWidget {
@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(),
),
);
}