shark 0.0.2 copy "shark: ^0.0.2" to clipboard
shark: ^0.0.2 copied to clipboard

outdated

A Flutter server rendering framework

example/lib/main.dart

import 'package:dynamic_widget/dynamic_widget.dart';
import 'package:flutter/material.dart';
import 'package:shark/shark.dart';
import 'package:shark/views/shark_controller.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Shark.init(hostUrl: 'http://localhost:8080');

  runApp(MaterialApp(home: MyApp()));
}

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

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late final SharkController _controller;

  @override
  void initState() {
    _controller = SharkController.fromUrl(path: '/container',)..get();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return SharkWidget(controller: _controller);
  }
}
57
likes
0
points
98
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter server rendering framework

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

device_info_plus, dio, dynamic_widget, flutter, hive, hive_flutter, path_provider

More

Packages that depend on shark