Untitled

mail@pastecode.io avatarunknown
plain_text
a month ago
2.3 kB
0
Indexable
Never
                Expanded(
                  child: Container(
                    margin: EdgeInsets.all(8),
                    padding: EdgeInsets.all(8),
                    decoration: BoxDecoration(
                      color: kActiveCardColour,
                    ),
                    child: Column(
                      children: [
                        Text(
                          'Usia',
                          style: kLabelTextStyle,
                        ),
                        Text(
                          '$usia',
                          style: kNumberTextStyle,
                        ),
                        Row(
                          children: [
                            Expanded(
                              child: MaterialButton(
                                onPressed: () {
                                  setState(() {
                                    usia++;
                                  });
                                },
                                color: kBottomContainerColour,
                                textColor: Colors.white,
                                child: Icon(
                                  Icons.add,
                                  size: 24,
                                ),
                                padding: EdgeInsets.all(16),
                                shape: CircleBorder(),
                              ),
                            ),
                            Expanded(
                              child: MaterialButton(
                                onPressed: () {
                                  setState(() {
                                    usia--;
                                  });
                                },
                                color: kBottomContainerColour,
                                textColor: Colors.white,
                                child: Icon(
                                  Icons.remove,
                                  size: 24,
                                ),
                                padding: EdgeInsets.all(16),
                                shape: CircleBorder(),
                              ),
                            ),