flutter_base_extensions 0.0.1 copy "flutter_base_extensions: ^0.0.1" to clipboard
flutter_base_extensions: ^0.0.1 copied to clipboard

This package used for apply height width with just using extension, this package is also used for convert string to dynamic color object

example/lib/main.dart

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

///  this is a example of flutter package to add flutter_base_extensions in any widget for Android and IOS
void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  /// This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'flutter_base_extensions demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const HomeScreen(),
    );
  }
}

/// root page of out application
class HomeScreen extends StatefulWidget {
  const HomeScreen({Key? key}) : super(key: key);

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          /// here we used getHeight and getWidth package
          100.0.getHeight(),
          500.0.getWidth(),

          /// here we used toColor extension to convert string to color
          Container(
            color: "0xFF000000".toColor(),
          ),
        ],
      ),
    );
  }
}
1
likes
150
points
16
downloads

Publisher

verified publisherwhiteorangesoftware.com

Weekly Downloads

This package used for apply height width with just using extension, this package is also used for convert string to dynamic color object

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_base_extensions