simulate 0.0.15 copy "simulate: ^0.0.15" to clipboard
simulate: ^0.0.15 copied to clipboard

Simulate application or add device mock on your app or your flutter project suppoer cross platform android ios , linux , macos, windows.

example/lib/main.dart

// ignore_for_file: unused_local_variable, duplicate_ignore
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:simulate/simulate.dart';

void main() {
  if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) {
    initSimulate();
  }
  runApp(
    const App(),
  );
}

class App extends StatelessWidget {
  const App({
    super.key,
  });
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Simulate(
        isShowFrame: true, // set false for disabled
        home: MaterialApp(
          debugShowCheckedModeBanner: false,
          debugShowMaterialGrid: false,
          showPerformanceOverlay: false,
          home: Home(),
        ),
      ),
    );
  }
}

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

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: const Center(
        child: Text("Alow"),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          Navigator.push(
            context,
            MaterialPageRoute(builder: (context) {
              return const LoginScreen();
            }),
          );
        },
        child: const Icon(
          Icons.login,
        ),
      ),
    );
  }
}

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

  @override
  State<LoginScreen> createState() => _LoginScreenState();
}

class _LoginScreenState extends State<LoginScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: FloatingActionButton(
          onPressed: () {
            Navigator.pop(context);
          },
          child: const Icon(
            Icons.arrow_back,
          ),
        ),
      ),
      body: const Center(
        child: Text("Alow"),
      ),
    );
  }
}
10
likes
0
pub points
54%
popularity

Publisher

unverified uploader

Simulate application or add device mock on your app or your flutter project suppoer cross platform android ios , linux , macos, windows.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

bitsdojo_window, cupertino_icons, device_frame, file_picker, flutter, flutter_acrylic, flutter_remix, hexaminate, iconsax

More

Packages that depend on simulate