我有一个用作前端的无状态 Web 应用程序,一个有状态的 webapi(想用作网关)应用程序和两个无状态应用程序。我想在本地服务结构集群上的不同节点中运行所有服务。
如何配置?
import 'package:flutter/material.dart';
class ToDosScreen extends StatelessWidget {
const ToDosScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Todos'),
backgroundColor: Colors.purple,
centerTitle: true,
),
body: Column(
children: <Widget>[
const SizedBox(
height: 16,
),
Row(
children: const [
Expanded(flex: 1, child: Icon(Icons.list_alt_outlined)),
Expanded(flex: 2, child: Text('Kegiatan')),
Expanded(
flex: 9,
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8, vertical: 16),
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
hintText: 'Judul Kegiatan',
),
),
)),
],
),
Row(
children: const [
Expanded(flex: 1, child: Icon(Icons.subject)),
Expanded(flex: 11, child: Text('Keterangan')),
],
),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
hintText: 'Tambah Keterangan',
contentPadding: EdgeInsets.fromLTRB(8, 50, 8, 50)),
),
),
Row(
children: <Widget>[
Expanded(
flex: 6,
child: Row(
children: const [
Expanded(flex: 4, child: Icon(Icons.date_range)),
Expanded(flex: 8, child: Text('Tanggal Mulai')),
],
)),
Expanded(
flex: 6,
child: Row(
children: const [
Expanded(
flex: 4, child: Icon(Icons.date_range_outlined)),
Expanded(flex: 8, child: Text('Tanggal Selesai')),
],
)),
],
),
Row(
children: <Widget>[
Expanded(
flex: 6,
child: Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 16),
child: TextFormField(
decoration: const InputDecoration(
border: UnderlineInputBorder(),
hintText: '20-03-2022',
)))),
),
Expanded(
flex: 6,
child: Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 16),
child: TextFormField(
decoration: const InputDecoration(
border: UnderlineInputBorder(),
hintText: '20-03-2022',
)))),
),
],
),
Row(
children: <Widget>[
Expanded(
flex: 6,
child: Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 16),
child: ElevatedButton(
onPressed: () {
//
},
child: const Text('Batal'),
style: ElevatedButton.styleFrom(
minimumSize: const Size(100, 40)),
)))),
Expanded(
flex: 6,
child: Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 16),
child: ElevatedButton(
onPressed: () {
//
},
child: const Text('Simpan'),
style: ElevatedButton.styleFrom(
minimumSize: const Size(100, 40),
foregroundColor: Colors.white),
)))),
],
),
],
));
}
}