xuxu_ui 0.0.3 copy "xuxu_ui: ^0.0.3" to clipboard
xuxu_ui: ^0.0.3 copied to clipboard

XuXu UI Design Flutter framework that makes development time shorter and useful package.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:xuxu_ui/xuxu_ui.dart';

void main() {
  runApp(MaterialApp(
    home: MyApp(),
  ));
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int number = 10;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(),
        body: XuVStack([
          XuBox(child: XuText("$number").create())
              .size(height: 100, width: 100)
              .decoration(XuBoxDecoration().color(Colors.red))
              .create()
              .onTap(() {
            number = 50;
          }, state: this), // Auto update state
          XuBox(child: XuText("$number").create())
              .size(height: 100, width: 100)
              .color(Colors.blue)
              .create()
              .onDoubleTap(() {
            number = 100;
          }),
          XuBox(child: XuText("$number").create())
              .size(height: 100, width: 100)
              .color(Colors.blue)
              .create()
              .onLongPress(() {
            number = 50;
          }),

          // With XuXu UI
          XuZStack([
            
            XuText("Demo 1").fontSize(26).create().positioned(left: 20, top: 20),

            XuBox(child: XuText("Demo 2").create().center()).create().positioned()

          ]).clip(Clip.none).create(),

          // Default Flutter
          Stack(
            clipBehavior: Clip.none,
            children: [
              Positioned(
                left: 20,
                top: 20,
                child: Text(
                  "Demo 1",
                  style: TextStyle(fontSize: 26),
                ),
              ),
              Positioned(
                child: Container(
                  child: Center(child: Text("Demo 2")),
                ),
              )
            ],
          )
        ]).create());
  }
}
6
likes
30
pub points
0%
popularity

Publisher

unverified uploader

XuXu UI Design Flutter framework that makes development time shorter and useful package.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on xuxu_ui