Flutter RotatedBox [Rotated Box]


import 'package:flutter/material.dart';

class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          'Rotated Box',
        ),
        centerTitle: true,
        elevation: 0.0,
      ),
      body: Container(
        height: 80.0,
        color: Colors.red,
        child: RotatedBox(
          quarterTurns: 3,
          child: Text("JAPAN"),
        ),
      ),
    );
  }
}
Output:

Share on Google Plus

About Ram Pukar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment