This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
import 'package:shopy/models/dommydata/sample.dart'; | |
import 'package:shopy/presentation/widget/product_details.dart'; | |
import '../../models/dommydata/products.dart'; | |
import '../../resources/color_manager.dart'; | |
import '../../resources/sized_manager.dart'; | |
class Recommens extends StatefulWidget { | |
//final DummyProduct recomendsProduct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:air_hukup/prensentation/resources/color_manager.dart'; | |
import 'package:air_hukup/prensentation/resources/style_manager.dart'; | |
import 'package:flutter/material.dart'; | |
import '../resources/value_manager.dart'; | |
class GenderPage extends StatefulWidget { | |
const GenderPage({Key? key}) : super(key: key); | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:air_hukup/prensentation/resources/color_manager.dart'; | |
import 'package:air_hukup/prensentation/resources/style_manager.dart'; | |
import 'package:flutter/material.dart'; | |
import '../resources/value_manager.dart'; | |
class GenderPage extends StatefulWidget { | |
const GenderPage({Key? key}) : super(key: key); | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function countUniqueValues(arr){ | |
if(arr.length ===0) return 0; | |
let i = 0; | |
for(j =1; j<arr.length; j++){ | |
if (arr[i] !== arr[j]) { | |
i++; | |
arr[i] = arr[j]; | |
} | |
} | |
return i + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
void main() { | |
loveCalculator(); | |
} | |
void loveCalculator(){ | |
int loveScore = Random().nextInt(100) + 1; | |
print(loveScore); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//use classes to define new type | |
//we are used to int, String, bool, List, Map, Set, Function | |
//classes - blueprint for objects | |
//object - container that holds some data (functionality in manipulate the data) | |
void main() { | |
var myHouse = House(nuOfWindows: 8, nuOfDoors: 4, typesOfWalls: 'Brick', typesOfRoof:'Tile'); | |
// myHouse.nrOfDoors = 10; | |
// | |
// print(myHouse.nrOfDoors); | |
myHouse.printHouses(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final list = [10, 20, 33]; | |
// for (var item in list) { | |
// print(item); | |
// } | |
//forEach | |
list.forEach((item) => print(item)); | |
list.forEach(print); | |
//Map Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var doubleValues = [10.2, 2.2, 3.0, 4.5, 5.5, 6.0, 7.4, 80.0, 9.0]; | |
var stringValues = ['@','*', '&' ]; | |
var newDoubleVlues = <double>[]; | |
var newStringValue = <String>[]; | |
//listOperation(doubleValues, (double val) => newDoubleValues.add(val *3)); | |
listOperation(doubleValues,(double val) => newDoubleVlues.add(val * 5)); | |
listOperation(stringValues,(String val)=> newStringValue.add(val * 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var doubleValues = [10.2, 2.2, 3.0, 4.5, 5.5, 6.0, 7.4, 80.0, 9.0]; | |
var stringValues = ['@','*', '&' ]; | |
var newDoubleVlues = <double>[]; | |
var newStringValue = <String>[]; | |
//listOperation(doubleValues, (double val) => newDoubleValues.add(val *3)); | |
listOperation(doubleValues,(double val) => newDoubleVlues.add(val * 5)); | |
listOperation(stringValues,(String val)=> newStringValue.add(val * 2)); |
NewerOlder