view places header alignment
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import 'package:fforte/addCam/add_cam_main.dart';
|
import 'package:fforte/addCam/add_cam_main.dart';
|
||||||
import 'package:fforte/other/db_helper.dart';
|
import 'package:fforte/other/db_helper.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||||
// * Site that shows all entries in the databases
|
// * Site that shows all entries in the databases
|
||||||
@@ -124,7 +126,8 @@ class _ViewCamsState extends State<ViewCams> {
|
|||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
return Text('Error: ${snapshot.error}');
|
return Text('Error: ${snapshot.error}');
|
||||||
} else {
|
} else {
|
||||||
List<Map<String,dynamic>> placeList = List.of(snapshot.data!);
|
List<Map<String, dynamic>> placeList =
|
||||||
|
List.of(snapshot.data!);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
child: const Icon(Icons.delete),
|
child: const Icon(Icons.delete),
|
||||||
@@ -134,20 +137,30 @@ class _ViewCamsState extends State<ViewCams> {
|
|||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(height: 10,),
|
||||||
height: 10,
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(width: 10,),
|
||||||
|
Text(
|
||||||
|
style: const TextStyle(
|
||||||
|
decoration: TextDecoration.underline
|
||||||
|
),
|
||||||
|
AppLocalizations.of(context)!.placedata),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Text(
|
||||||
flex: 2,
|
style: const TextStyle(
|
||||||
child: Text(
|
decoration: TextDecoration.underline
|
||||||
AppLocalizations.of(context)!.placedata)),
|
),
|
||||||
Expanded(
|
AppLocalizations.of(context)!.sent),
|
||||||
flex: 2,
|
const SizedBox(width: 10,),
|
||||||
child:
|
],
|
||||||
Text(AppLocalizations.of(context)!.sent)),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@@ -157,19 +170,22 @@ class _ViewCamsState extends State<ViewCams> {
|
|||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: placeList.length,
|
itemCount: placeList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
Map<String, dynamic> place = snapshot.data![index];
|
Map<String, dynamic> place =
|
||||||
|
snapshot.data![index];
|
||||||
return Slidable(
|
return Slidable(
|
||||||
startActionPane: ActionPane(
|
startActionPane: ActionPane(
|
||||||
motion: const ScrollMotion(),
|
motion: const ScrollMotion(),
|
||||||
children: [
|
children: [
|
||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (context) {
|
onPressed: (context) {
|
||||||
delSinglePlace(place['ID'.toString()]);
|
delSinglePlace(
|
||||||
|
place['ID'.toString()]);
|
||||||
},
|
},
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
icon: Icons.delete,
|
icon: Icons.delete,
|
||||||
label: AppLocalizations.of(context)!.justdelete,
|
label: AppLocalizations.of(context)!
|
||||||
|
.justdelete,
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
|
|||||||
Reference in New Issue
Block a user