美文网首页
2019-01-15

2019-01-15

作者: 入秋未凉的海 | 来源:发表于2019-01-15 22:02 被阅读0次
    hello world
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'welcome to Flutter',
          home: Scaffold(
            appBar: AppBar(
              title: Text('Hello World'),
            ),
            body: Center(
              child: Text('Hello World'),
            ),
          )
        );
      }
    }
    
    image.png image.png image.png
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'TextWidget',
          home: Scaffold(
            appBar: AppBar(
              title: Text('TextWidget'),
            ),
            body: Center(
              child: Text('Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin',
              textAlign: TextAlign.right,
              maxLines: 1,
              overflow: TextOverflow.ellipsis,
              ),
            ),
          )
        );
      }
    }
    
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'TextWidget',
          home: Scaffold(
            appBar: AppBar(
              title: Text('TextWidget'),
            ),
            body: Center(
              child: Text(
                'Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin Hello World xubin',
                textAlign: TextAlign.right,
                style: TextStyle(
                  fontSize: 25.0,
                  color: Color.fromARGB(255, 255, 150, 150),
                  decoration: TextDecoration.underline,
                  decorationStyle: TextDecorationStyle.solid
                ),
              ),
            ),
          )
        );
      }
    }
    
    image.png
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'TextWidget',
          home: Scaffold(
            appBar: AppBar(
              title: Text('TextWidget'),
            ),
            body: Center(
              child: Container(
                child: Text(
                  'Hello World',
                  style: TextStyle(
                    fontSize: 25.0,
                  ),
                ),
                alignment: Alignment.bottomRight,
                width: 200.0,
                height: 200.0,
                color: Colors.lightBlue,
              ),
            ),
          )
        );
      }
    }
    
    image.png image.png
    image.png

    相关文章

      网友评论

          本文标题:2019-01-15

          本文链接:https://www.haomeiwen.com/subject/cnpudqtx.html