import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:trans_lark/page/web_page/web_page_controller.dart';
import 'package:trans_lark/widget/t_base_appbar_widget.dart';
import 'package:trans_lark/widget/t_view_state_widget.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebPageView extends GetView<WebPageController> {
  const WebPageView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: TBaseAppbarWidget(
        title: controller.title,
      ),
      body: Obx(() {
        return TViewStateWidget(
          viewState: controller.viewState.value,
          child: WebViewWidget(controller: controller.webViewController),
        );
      }),
    );
  }
}
