flutter_ffmpeg_test_app.dart 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_ffmpeg_example/flutter_ffmpeg_test_app_state.dart';
  3. void main() => runApp(FlutterFFmpegTestApp());
  4. class FlutterFFmpegTestApp extends StatelessWidget {
  5. @override
  6. Widget build(BuildContext context) {
  7. return MaterialApp(
  8. theme: ThemeData(
  9. primaryColor: Color(0xFFF46842),
  10. ),
  11. home: MainPage(),
  12. );
  13. }
  14. }
  15. class MainPage extends StatefulWidget {
  16. @override
  17. FlutterFFmpegTestAppState createState() => new FlutterFFmpegTestAppState();
  18. }
  19. class DecoratedTabBar extends StatelessWidget implements PreferredSizeWidget {
  20. DecoratedTabBar({@required this.tabBar, @required this.decoration});
  21. final TabBar tabBar;
  22. final BoxDecoration decoration;
  23. @override
  24. Size get preferredSize => tabBar.preferredSize;
  25. @override
  26. Widget build(BuildContext context) {
  27. return Stack(
  28. children: [
  29. Positioned.fill(child: Container(decoration: decoration)),
  30. tabBar,
  31. ],
  32. );
  33. }
  34. }