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

discontinuedreplaced by: auto_size_widget
outdated

An extended package of RichTrex package which is used as a resizable image widget. This supports svg, base64, and other basic image file from internet (probably).

example/lib/main.dart

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

void main() {
  runApp(const MaterialApp(title: "RichTrex Image Demo", home: MyApp()));
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var controller = TextEditingController();

  String url =
      "https://www.kindpng.com/picc/b/355-3557482_package-icon-png.png";
  void setText(String url) => setState(() => this.url = url);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: const Text("Image Resize Demo")),
        body: SafeArea(
            child: Container(
                alignment: Alignment.center,
                padding: const EdgeInsets.all(kToolbarHeight),
                child: RichTrexImage(url, size: const Size(100, 100)))),
        bottomSheet: Container(
            height: kToolbarHeight,
            decoration: BoxDecoration(color: Colors.black.withOpacity(0.05)),
            padding: const EdgeInsets.symmetric(horizontal: 8.0),
            child: TextField(
                controller: controller,
                decoration: InputDecoration(
                    hintText: "Insert URL Here",
                    suffixIcon: InkWell(
                        onTap: () => setText(controller.text),
                        child: Icon(Icons.send,
                            color: Colors.black.withOpacity(0.5)))))));
  }
}
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

An extended package of RichTrex package which is used as a resizable image widget. This supports svg, base64, and other basic image file from internet (probably).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_svg, provider

More

Packages that depend on richtrex_image