
import 'package:flutter/material.dart';
import 'package:flutter_wisetronic/generated/l10n.dart';

class DesktopIndexMainContent1 extends StatefulWidget {
  final String message;
  const DesktopIndexMainContent1(this.message, {Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() {
    return DesktopIndexMainContent1State();
  }
}

class DesktopIndexMainContent1State extends State<DesktopIndexMainContent1> {
  double sideSpace = 0;
  double mainSpace = 1200;

  @override
  Widget build(BuildContext context) {
    if (MediaQuery.of(context).size.width <= 1200) {
      mainSpace = MediaQuery.of(context).size.width;
      sideSpace = 0;
    } else {
      mainSpace = 1200;
      sideSpace = (MediaQuery.of(context).size.width - 1200) / 2;
    }

    return Row(
      children: [
        Container(
          width: sideSpace,
        ),
        Container(
          width: mainSpace,
          margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
          padding: EdgeInsets.symmetric(vertical: 30.0, horizontal: 30.0),
          child: Container(
            child: Text(
              widget.message,
              style: TextStyle(
                fontSize: 20,
                fontWeight: FontWeight.bold,
                color: Colors.white,
              ),
            ),
          ),
          decoration: BoxDecoration(
            color: Color(0xFF4FB0C6),
            borderRadius: BorderRadius.circular(10),
          ),
        ),
        Container(
          width: sideSpace,
        ),
      ],
    );
  }

}