mosekat.net
Summary
Freelancer Client is hiring: mosekat.net.
Location: Remote
class NaghamApp extends StatelessWidget {
double total = cartItems.fold(0, (sum, item) => sum + item["price"]);
Skills: Java, JavaScript, Cold Fusion, Python, Flex
Budget: $15–$25 USD
Source: Freelancer Client via Remote / Online. Apply on the source website.
Original
import 'package:flutter/material.dart';
void main() {
runApp(NaghamApp());
}
class NaghamApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'نغمة',
theme: ThemeData(primarySwatch: Colors.brown),
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
final List categories = ["جيتارات", "بيانو", "عود", "طبول"];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("نغمة")),
body: Column(
children: [
TextField(
decoration: InputDecoration(
hintText: "ابحث عن منتج...",
prefixIcon: Icon(Icons.search),
),
),
Expanded(
child: ListView.builder(
itemCount: categories.length,
itemBuilder: (context, index) {
return ListTile(
title: Text(categories[index]),
trailing: Icon(Icons.arrow_forward),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ProductPage()),
);
},
);
},
),
),
],
),
);
}
}
class ProductPage extends StatelessWidget {
final String productName = "غيتار ياماها F310";
final double price = 350.0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(productName)),
body: Column(
children: [
Image.network("https://via.placeholder.com/200"),
Text(productName, style: TextStyle(fontSize: 22)),
Text("السعر: $price د.أ"),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => CartPage()),
);
},
child: Text("أضف للسلة"),
),
],
),
);
}
}
class CartPage extends StatelessWidget {
final List> cartItems = [
{"name": "غيتار ياماها F310", "price": 350.0},
{"name": "عود شرقي", "price": 450.0},
];
@override
Widget build(BuildContext context) {
double total = cartItems.fold(0, (sum, item) => sum + item["price"]);
return Scaffold(
appBar: AppBar(title: Text("سلة المشتريات")),
body: Column(
children: [
Expanded(
child: ListView.builder(
itemCount: cartItems.length,
itemBuilder: (context, index) {
return ListTile(
title: Text(cartItems[index]["name"]),
subtitle: Text("${cartItems[index]["price"]} د.أ"),
);
},
),
),
Text("المجموع: $total د.أ", style: TextStyle(fontSize: 20)),
ElevatedButton(
onPressed: () {},
child: Text("إتمام الطلب"),
),
],
),
);
}
}
Location & Details
Apply on source →About this listing
This remote opportunity was imported from Freelancer and is shown here for discovery. To apply, follow the link to the original posting.