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

outdated

With this extension, you can create a loading dialog that lasts from the moment you run the Future functions until the process is complete.

DrKlepson Flutter Loading Extension #

Bu extension ile birlikte Future fonksiyonlarını çalıştırdığınız andan işlem tamamlanana kadar süren bir loading diyalog oluşturabilirsiniz.


With this extension, you can create a loading dialog that lasts from the moment you run the Future functions until the process is complete.

Testler #

Testleri çalıştırmak için aşağıdaki komutu çalıştırın

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

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  int count = 0;

  Future<void> fetchString() async {
    return await Future.delayed(
      const Duration(seconds: 3),
      () => setState(() => count += 1),
    );
  }

  String? data;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Context Loading")),
      body: Center(
        child: ElevatedButton(
            onPressed: () => context.futureWithLoading(fetchString()),
            child: Text("Button $count")),
      ),
    );
  }
}

Destek #

Destek için drmaliaydogdu@gmail.com adresine e-posta gönderin.

0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

With this extension, you can create a loading dialog that lasts from the moment you run the Future functions until the process is complete.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on drklepson_future_loading