Обновление для Python3:
import csv
with open('file.csv', 'r') as f:
reader = csv.reader(f)
your_list = list(reader)
print(your_list)
# [['This is the first line', 'Line1'],
# ['This is the second line', 'Line2'],
# ['This is the third line', 'Line3']]
Попробуйте этот код. Я сделал некоторые изменения в вашем коде, теперь GestureDetector
разделен поровну по ширине на виджете, поэтому при нажатии на левую сторону поля он перевернет анимацию, а если вы нажмете на правую боковая часть будет пересылать анимацию.
Widget _tapDetectionControls() {
return Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: GestureDetector(
onTap: _leftRotation,
),
),
Expanded(
flex: 1,
child: GestureDetector(
onTap: _rightRotation,
),
),
],
);
}
void _leftRotation() {
controller.reverse();
}
void _rightRotation() {
controller.forward();
}