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

A powerful free proxy rotator and web scraping toolkit for Dart and Flutter applications with dynamic proxy sourcing, smart rotation, and advanced web scraping capabilities.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';

import 'core/app/app_layout.dart';
import 'core/design/app_theme.dart';
import 'core/services/service_locator.dart';
import 'core/services/theme_manager.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Apply system UI overlay style
  SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      statusBarIconBrightness: Brightness.dark,
      statusBarBrightness: Brightness.light,
    ),
  );

  // Load Google Fonts
  await GoogleFonts.pendingFonts([GoogleFonts.inter()]);

  // Initialize service locator
  await setupServiceLocator();

  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  final _themeManager = serviceLocator<ThemeManager>();

  @override
  void initState() {
    super.initState();

    // Listen for theme changes
    _themeManager.addListener(_themeListener);
  }

  @override
  void dispose() {
    _themeManager.removeListener(_themeListener);
    super.dispose();
  }

  void _themeListener() {
    setState(() {});

    // Update system UI based on theme
    final isDark =
        _themeManager.themeMode == ThemeMode.dark ||
        (_themeManager.themeMode == ThemeMode.system &&
            WidgetsBinding.instance.platformDispatcher.platformBrightness ==
                Brightness.dark);

    SystemChrome.setSystemUIOverlayStyle(
      SystemUiOverlayStyle(
        statusBarColor: Colors.transparent,
        statusBarIconBrightness: isDark ? Brightness.light : Brightness.dark,
        statusBarBrightness: isDark ? Brightness.dark : Brightness.light,
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Pivox',
      theme: AppTheme.lightTheme(),
      darkTheme: AppTheme.darkTheme(),
      themeMode: _themeManager.themeMode,
      home: const AppLayout(),
      debugShowCheckedModeBanner: false,
    );
  }
}
1
likes
150
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful free proxy rotator and web scraping toolkit for Dart and Flutter applications with dynamic proxy sourcing, smart rotation, and advanced web scraping capabilities.

Repository (GitHub)
View/report issues

Topics

#proxy #web-scraping #http #networking #scraping

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

data_cache_x, dio, flutter, get_it, html, http, path, path_provider, shared_preferences

More

Packages that depend on pivox