vize 1.0.0 copy "vize: ^1.0.0" to clipboard
vize: ^1.0.0 copied to clipboard

Vize is a modern, developer-friendly Flutter package for effortless responsive UIs that match your Figma designs perfectly.

example/main.dart

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

/// Entry point for the Vize example application.
void main() => runApp(const MyApp());

/// Main application widget for Vize demonstration.
class MyApp extends StatelessWidget {
  /// Creates a [MyApp] instance.
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: (context, child) {
        /// Initialize Vize with Figma dimensions
        Vize.init(context, figmaWidth: 390, figmaHeight: 844);
        return child!;
      },
      home: const HomePage(),
    );
  }
}

/// Demonstration page showing Vize responsiveness in action.
class HomePage extends StatelessWidget {
  /// Creates a [HomePage] instance.
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        padding: 20.pa,

        /// Scaled padding
        child: Column(
          children: [
            Container(
              width: 100.w,

              /// 100% of screen width
              height: 20.h,

              /// 20% of screen height
              decoration: BoxDecoration(
                color: Colors.blueAccent,
                borderRadius: BorderRadius.circular(12.r),

                /// Scaled radius
              ),
              child: Center(
                child: Text(
                  'Header',
                  style: TextStyle(fontSize: 22.ts),

                  /// Scaled text
                ),
              ),
            ),

            2.hs,

            /// 2% height spacing
            GridView.builder(
              shrinkWrap: true,
              itemCount: 4,
              gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: adaptiveColumns(
                  mobile: 1,
                  tablet: 2,
                  desktop: 4,
                ),
                mainAxisSpacing: sp(2),

                /// 16px scaled spacing
                crossAxisSpacing: sp(2),
              ),
              itemBuilder: (context, i) => Container(
                color: Colors.grey[200],
                alignment: Alignment.center,
                child: Text('Item $i'),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
0
points
330
downloads

Publisher

unverified uploader

Weekly Downloads

Vize is a modern, developer-friendly Flutter package for effortless responsive UIs that match your Figma designs perfectly.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on vize