treeuse 0.0.6 copy "treeuse: ^0.0.6" to clipboard
treeuse: ^0.0.6 copied to clipboard

Treeuse package to have incredible reusable components

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:treeuse/helpers/treeuse_helper.dart';
import 'package:treeuse/widgets/treeuse_responsive.dart';

// Usage Example:
void main() {
  runApp(
    MyTreeuseApp(),
  );
}

class MyTreeuseApp extends StatelessWidget {
  
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Treeuse Responsive App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Treeuse Responsive Builder Example'),
        ),
        body: TreeuseResponsive(
          child: Center(
            child: Builder(
              builder: (context) {
                if (TreeuseRespHelper.isTMobile) {
                  return Text(TreeuseRespHelper.isTPortrait
                      ? 'Mobile - Portrait'
                      : 'Mobile - Landscape');
                } else if (TreeuseRespHelper.isTTablet) {
                  return const Text('This is a Tablet');
                } else if (TreeuseRespHelper.isTWeb) {
                  return const Text('This is a Web device');
                } else if (TreeuseRespHelper.isTDesktop) {
                  return const Text('This is a Desktop device');
                } else {
                  return const Text('Unknown device type');
                }
              },
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
140
points
12
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Treeuse package to have incredible reusable components

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on treeuse