您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

75 行
2.5 KiB

using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using uiwidgets;
using UIWidgetsGallery.gallery;
using Unity.UIWidgets.cupertino;
using Unity.UIWidgets.engine;
using Unity.UIWidgets.material;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using Text = Unity.UIWidgets.widgets.Text;
using ui_ = Unity.UIWidgets.widgets.ui_;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
namespace UIWidgetsSample
{
public class LottieDemo : UIWidgetsPanel
{
protected void OnEnable()
{
base.OnEnable();
}
protected override void main()
{
ui_.runApp(new LottieApp());
}
}
class LottieApp : StatelessWidget
{
public static List<string> lotties = new List<string>()
{
"1055-world-locations.json",
"1370-confetti.json",
"1798-check-animation.json",
"226-splashy-loader.json",
"66992-the-flying-rocket.json",
"77-im-thirsty.json",
"782-check-mark-success.json",
"91-mailsent.json",
"lottieflow-checkbox-06-000000-easey.json",
"lottieflow-cta-04-000000-easey.json",
"lottieflow-radio-07-000000-easey.json",
"lottieflow-social-networks-16-12-000000-easey.json",
"lottieflow-social-networks-16-7-000000-easey.json",
};
public override Widget build(BuildContext context)
{
var body = lotties.Select(file => new Lottie(file)).ToList<Widget>();
return new MaterialApp(
theme: new ThemeData(
brightness: Brightness.dark,
primaryColor: Colors.transparent,
accentColor: Colors.cyan[600],
textTheme: new TextTheme(
headline1: new TextStyle(fontSize: 72.0f, fontWeight: FontWeight.bold),
headline6: new TextStyle(fontSize: 36.0f, fontStyle: FontStyle.italic),
bodyText2: new TextStyle(fontSize: 14.0f)
)
),
home: new DefaultTabController(
length: body.Count,
child: new Scaffold(
backgroundColor: AnimationHomeUtils._kAppBackgroundColor,
body: new TabBarView(
children: body
)
)
)
);
}
}
}